| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api
Contents
- Eras
- Type tags
- Cryptographic key interface
- Payment addresses
- Stake addresses
- Currency values
- Blocks
- Building transactions
- Building transactions
- Signing transactions
- Fee calculation
- Transaction metadata
- Certificates
- Stake pool off-chain metadata
- Scripts
- Use of a script in an era as a witness
- Serialisation
- Errors
- Node interaction
- Node operation
- Genesis file
- Special transactions
- Protocol parameter updates
Description
This module provides a library interface for interacting with Cardano as a user of the system.
It is intended to be the complete API covering everything but without exposing constructors that reveal any lower level types.
In the interest of simplicity it glosses over some details of the system. Most simple tools should be able to work just using this interface, however you can go deeper and expose the types from the underlying libraries using Cardano.Api.Byron or Cardano.Api.Shelley.
Synopsis
- data ByronEra
- data ShelleyEra
- data AllegraEra
- data MaryEra
- data CardanoEra era where
- class HasTypeProxy era ⇒ IsCardanoEra era where
- cardanoEra ∷ CardanoEra era
- data AnyCardanoEra where
- AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra
- anyCardanoEra ∷ CardanoEra era → AnyCardanoEra
- data InAnyCardanoEra thing where
- InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing
- data ShelleyBasedEra era where
- class (IsCardanoEra era, Crypto (ShelleyLedgerEra era) ~ StandardCrypto) ⇒ IsShelleyBasedEra era where
- data InAnyShelleyBasedEra thing where
- InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing
- data CardanoEraStyle era where
- LegacyByronEra ∷ CardanoEraStyle ByronEra
- ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era
- cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era
- type Byron = ByronEra
- type Shelley = ShelleyEra
- type Allegra = AllegraEra
- type Mary = MaryEra
- class HasTypeProxy t where
- data AsType t
- proxyToAsType ∷ Proxy t → AsType t
- class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole
- data family VerificationKey keyrole ∷ Type
- getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole
- verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole
- castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB
- castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB
- generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole)
- deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole
- deterministicSigningKeySeedSize ∷ Key keyrole ⇒ AsType keyrole → Word
- data family Hash keyrole ∷ Type
- castHash ∷ CastHash roleA roleB ⇒ Hash roleA → Hash roleB
- data Address addrtype
- data ByronAddr
- data ShelleyAddr
- data NetworkId
- makeByronAddress ∷ NetworkId → VerificationKey ByronKey → Address ByronAddr
- data ByronKey
- data ByronKeyLegacy
- makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr
- data PaymentCredential
- data StakeAddressReference
- = StakeAddressByValue StakeCredential
- | StakeAddressByPointer StakeAddressPointer
- | NoStakeAddress
- data PaymentKey
- data PaymentExtendedKey
- data AddressAny
- data AddressInEra era where
- AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era
- data AddressTypeInEra addrtype era where
- byronAddressInEra ∷ Address ByronAddr → AddressInEra era
- shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era
- anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era
- anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era)
- toAddressAny ∷ Address addr → AddressAny
- makeByronAddressInEra ∷ NetworkId → VerificationKey ByronKey → AddressInEra era
- makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era
- data StakeAddress
- data StakeCredential
- makeStakeAddress ∷ NetworkId → StakeCredential → StakeAddress
- data StakeKey
- data StakeExtendedKey
- data Lovelace
- newtype Quantity = Quantity Integer
- newtype PolicyId = PolicyId ScriptHash
- newtype AssetName = AssetName ByteString
- data AssetId
- data Value
- selectAsset ∷ Value → AssetId → Quantity
- valueFromList ∷ [(AssetId, Quantity)] → Value
- valueToList ∷ Value → [(AssetId, Quantity)]
- filterValue ∷ (AssetId → Bool) → Value → Value
- negateValue ∷ Value → Value
- newtype ValueNestedRep = ValueNestedRep [ValueNestedBundle]
- data ValueNestedBundle
- valueToNestedRep ∷ Value → ValueNestedRep
- valueFromNestedRep ∷ ValueNestedRep → Value
- quantityToLovelace ∷ Quantity → Lovelace
- lovelaceToQuantity ∷ Lovelace → Quantity
- selectLovelace ∷ Value → Lovelace
- lovelaceToValue ∷ Lovelace → Value
- valueToLovelace ∷ Value → Maybe Lovelace
- data Block era where
- pattern Block ∷ BlockHeader → [Tx era] → Block era
- data BlockHeader = BlockHeader !SlotNo !(Hash BlockHeader) !BlockNo
- data ChainPoint
- newtype EpochNo = EpochNo {}
- data ChainTip
- newtype BlockNo = BlockNo {}
- chainTipToChainPoint ∷ ChainTip → ChainPoint
- data TxBody era
- makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either (TxBodyError era) (TxBody era)
- data TxBodyContent build era = TxBodyContent {
- txIns ∷ [(TxIn, BuildTxWith build (Witness WitCtxTxIn era))]
- txOuts ∷ [TxOut era]
- txFee ∷ TxFee era
- txValidityRange ∷ (TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata ∷ TxMetadataInEra era
- txAuxScripts ∷ TxAuxScripts era
- txWithdrawals ∷ TxWithdrawals build era
- txCertificates ∷ TxCertificates build era
- txUpdateProposal ∷ TxUpdateProposal era
- txMintValue ∷ TxMintValue build era
- data TxBodyError era
- newtype TxId = TxId (Hash StandardCrypto EraIndependentTxBody)
- getTxId ∷ ∀ era. TxBody era → TxId
- data TxIn = TxIn TxId TxIx
- newtype TxIx = TxIx Word
- data TxOut era = TxOut (AddressInEra era) (TxOutValue era)
- data TxOutValue era where
- TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era
- TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era
- data TxFee era where
- TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era
- TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era
- data TxValidityLowerBound era where
- data TxValidityUpperBound era where
- newtype SlotNo = SlotNo {}
- newtype EpochSlots = EpochSlots {}
- data TxMetadataInEra era where
- TxMetadataNone ∷ TxMetadataInEra era
- TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era
- data TxAuxScripts era where
- TxAuxScriptsNone ∷ TxAuxScripts era
- TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era
- data TxWithdrawals build era where
- TxWithdrawalsNone ∷ TxWithdrawals build era
- TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era
- data TxCertificates build era where
- TxCertificatesNone ∷ TxCertificates build era
- TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era
- data TxUpdateProposal era where
- data TxMintValue build era where
- TxMintNone ∷ TxMintValue build era
- TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (Witness WitCtxMint era)) → TxMintValue build era
- data BuildTxWith build a where
- ViewTx ∷ BuildTxWith ViewTx a
- BuildTxWith ∷ a → BuildTxWith BuildTx a
- data BuildTx
- data ViewTx
- data MultiAssetSupportedInEra era where
- data OnlyAdaSupportedInEra era where
- data TxFeesExplicitInEra era where
- data TxFeesImplicitInEra era where
- data ValidityUpperBoundSupportedInEra era where
- data ValidityNoUpperBoundSupportedInEra era where
- data ValidityLowerBoundSupportedInEra era where
- data TxMetadataSupportedInEra era where
- data AuxScriptsSupportedInEra era where
- data WithdrawalsSupportedInEra era where
- data CertificatesSupportedInEra era where
- data UpdateProposalSupportedInEra era where
- multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era)
- txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era)
- withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era)
- certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era)
- updateProposalSupportedInEra ∷ CardanoEra era → Maybe (UpdateProposalSupportedInEra era)
- data Tx era where
- pattern Tx ∷ TxBody era → [KeyWitness era] → Tx era
- getTxBody ∷ ∀ era. Tx era → TxBody era
- getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era]
- signByronTransaction ∷ NetworkId → TxBody ByronEra → [SigningKey ByronKey] → Tx ByronEra
- signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era
- makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era
- data KeyWitness era
- makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → KeyWitness ByronEra
- makeByronTransaction ∷ [TxIn] → [TxOut ByronEra] → Either (TxBodyError ByronEra) (TxBody ByronEra)
- data ShelleyWitnessSigningKey
- = WitnessPaymentKey (SigningKey PaymentKey)
- | WitnessPaymentExtendedKey (SigningKey PaymentExtendedKey)
- | WitnessStakeKey (SigningKey StakeKey)
- | WitnessStakeExtendedKey (SigningKey StakeExtendedKey)
- | WitnessStakePoolKey (SigningKey StakePoolKey)
- | WitnessGenesisKey (SigningKey GenesisKey)
- | WitnessGenesisExtendedKey (SigningKey GenesisExtendedKey)
- | WitnessGenesisDelegateKey (SigningKey GenesisDelegateKey)
- | WitnessGenesisDelegateExtendedKey (SigningKey GenesisDelegateExtendedKey)
- | WitnessGenesisUTxOKey (SigningKey GenesisUTxOKey)
- makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → KeyWitness era
- makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → KeyWitness era
- transactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ Natural → Natural → Tx era → Lovelace
- estimateTransactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ NetworkId → Natural → Natural → Tx era → Int → Int → Int → Int → Lovelace
- newtype TxMetadata = TxMetadata (Map Word64 TxMetadataValue)
- data TxMetadataValue
- makeTransactionMetadata ∷ Map Word64 TxMetadataValue → TxMetadata
- validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] ()
- data TxMetadataRangeError
- data TxMetadataJsonSchema
- metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata
- metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value
- metadataValueToJsonNoSchema ∷ TxMetadataValue → Value
- data TxMetadataJsonError
- data TxMetadataJsonSchemaError
- = TxMetadataJsonNullNotAllowed
- | TxMetadataJsonBoolNotAllowed
- | TxMetadataJsonNumberNotInteger !Double
- | TxMetadataJsonNotObject !Value
- | TxMetadataJsonBadObject ![(Text, Value)]
- | TxMetadataJsonBadMapPair !Value
- | TxMetadataJsonTypeMismatch !Text !Value
- data Certificate
- makeStakeAddressRegistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDeregistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDelegationCertificate ∷ StakeCredential → PoolId → Certificate
- makeStakePoolRegistrationCertificate ∷ StakePoolParameters → Certificate
- makeStakePoolRetirementCertificate ∷ PoolId → EpochNo → Certificate
- data StakePoolParameters
- data StakePoolRelay
- data StakePoolMetadataReference
- data StakePoolMetadata
- validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata)
- data StakePoolMetadataValidationError
- data SimpleScriptV1
- data SimpleScriptV2
- data ScriptLanguage lang where
- SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang
- PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang
- data SimpleScriptVersion lang where
- data PlutusScriptVersion lang
- data AnyScriptLanguage where
- class HasTypeProxy lang ⇒ IsScriptLanguage lang where
- scriptLanguage ∷ ScriptLanguage lang
- class IsScriptLanguage lang ⇒ IsSimpleScriptLanguage lang where
- data Script lang where
- SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang
- PlutusScript ∷ !(PlutusScriptVersion lang) → () → Script lang
- data ScriptInAnyLang where
- ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang
- toScriptInAnyLang ∷ Script lang → ScriptInAnyLang
- data ScriptInEra era where
- ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era
- toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era)
- eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era
- data WitCtxTxIn
- data WitCtxMint
- data WitCtxStake
- data ScriptWitness witctx era where
- SimpleScriptWitness ∷ ScriptLanguageInEra lang era → SimpleScriptVersion lang → SimpleScript lang → ScriptWitness witctx era
- data Witness witctx era where
- KeyWitness ∷ KeyWitnessInCtx witctx → Witness witctx era
- ScriptWitness ∷ ScriptWitnessInCtx witctx → ScriptWitness witctx era → Witness witctx era
- data KeyWitnessInCtx witctx where
- data ScriptWitnessInCtx witctx where
- data ScriptLanguageInEra lang era where
- SimpleScriptV1InShelley ∷ ScriptLanguageInEra SimpleScriptV1 ShelleyEra
- SimpleScriptV1InAllegra ∷ ScriptLanguageInEra SimpleScriptV1 AllegraEra
- SimpleScriptV1InMary ∷ ScriptLanguageInEra SimpleScriptV1 MaryEra
- SimpleScriptV2InAllegra ∷ ScriptLanguageInEra SimpleScriptV2 AllegraEra
- SimpleScriptV2InMary ∷ ScriptLanguageInEra SimpleScriptV2 MaryEra
- scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era)
- languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang
- eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era
- data SimpleScript lang where
- RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang
- RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang
- data TimeLocksSupported lang where
- timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang)
- adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang')
- data ScriptHash
- hashScript ∷ Script lang → ScriptHash
- class HasTypeProxy a ⇒ SerialiseAsCBOR a
- class Typeable a ⇒ ToCBOR a
- class Typeable a ⇒ FromCBOR a
- serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString
- deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a
- class ToJSON a
- class FromJSON a
- serialiseToJSON ∷ ToJSON a ⇒ a → ByteString
- deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a
- newtype JsonDecodeError = JsonDecodeError String
- readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a)
- writeFileJSON ∷ ToJSON a ⇒ FilePath → a → IO (Either (FileError ()) ())
- class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a
- serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text
- deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a
- deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b
- data Bech32DecodeError
- = Bech32DecodingError !DecodingError
- | Bech32UnexpectedPrefix !Text !(Set Text)
- | Bech32DataPartToBytesError !Text
- | Bech32DeserialiseFromBytesError !ByteString
- | Bech32WrongPrefix !Text !Text
- class HasTypeProxy addr ⇒ SerialiseAddress addr
- serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text
- deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr
- class HasTypeProxy a ⇒ SerialiseAsRawBytes a
- serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHex ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text
- class SerialiseAsCBOR a ⇒ HasTextEnvelope a where
- data TextEnvelope = TextEnvelope {}
- newtype TextEnvelopeType = TextEnvelopeType String
- data TextEnvelopeDescr
- data TextEnvelopeError
- = TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType
- | TextEnvelopeDecodeError !DecoderError
- | TextEnvelopeAesonDecodeError !String
- textEnvelopeRawCBOR ∷ TextEnvelope → ByteString
- serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope
- deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a
- readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a)
- writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- data FromSomeType (c ∷ Type → Constraint) b where
- FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b
- deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b
- readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b)
- class Show e ⇒ Error e where
- displayError ∷ e → String
- throwErrorAsException ∷ Error e ⇒ e → IO a
- data FileError e
- connectToLocalNode ∷ LocalNodeConnectInfo mode → LocalNodeClientProtocolsInMode mode → IO ()
- data LocalNodeConnectInfo mode = LocalNodeConnectInfo {}
- data AnyConsensusMode where
- data ConsensusMode mode where
- consensusModeOnly ∷ ConsensusModeParams mode → ConsensusMode mode
- data ConsensusModeIsMultiEra mode where
- data AnyConsensusModeParams where
- data ConsensusModeParams mode where
- data EraInMode era mode where
- ByronEraInByronMode ∷ EraInMode ByronEra ByronMode
- ShelleyEraInShelleyMode ∷ EraInMode ShelleyEra ShelleyMode
- ByronEraInCardanoMode ∷ EraInMode ByronEra CardanoMode
- ShelleyEraInCardanoMode ∷ EraInMode ShelleyEra CardanoMode
- AllegraEraInCardanoMode ∷ EraInMode AllegraEra CardanoMode
- MaryEraInCardanoMode ∷ EraInMode MaryEra CardanoMode
- toEraInMode ∷ CardanoEra era → ConsensusMode mode → Maybe (EraInMode era mode)
- data LocalNodeClientProtocols block point tip tx txerr query m = LocalNodeClientProtocols {
- localChainSyncClient ∷ LocalChainSyncClient block point tip m
- localTxSubmissionClient ∷ Maybe (LocalTxSubmissionClient tx txerr m ())
- localStateQueryClient ∷ Maybe (LocalStateQueryClient block point query m ())
- data LocalChainSyncClient block point tip m
- = NoLocalChainSyncClient
- | LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ())
- | LocalChainSyncClient (ChainSyncClient block point tip m ())
- data CardanoMode
- newtype ChainSyncClient header point tip (m ∷ Type → Type) a = ChainSyncClient {
- runChainSyncClient ∷ m (ClientStIdle header point tip m a)
- newtype ChainSyncClientPipelined header point tip (m ∷ Type → Type) a = ChainSyncClientPipelined {
- runChainSyncClientPipelined ∷ m (ClientPipelinedStIdle 'Z header point tip m a)
- data BlockInMode mode where
- BlockInMode ∷ Block era → EraInMode era mode → BlockInMode mode
- type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols (BlockInMode mode) ChainPoint ChainTip (TxInMode mode) (TxValidationErrorInMode mode) (QueryInMode mode) IO
- data LocalTxSubmissionClient tx reject (m ∷ Type → Type) a
- data TxInMode mode where
- data TxValidationErrorInMode mode where
- TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode
- TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode
- runLocalTxSubmissionClient ∷ LocalTxSubmissionClient tx reject m a → m (LocalTxClientStIdle tx reject m a)
- submitTxToNodeLocal ∷ ∀ mode. LocalNodeConnectInfo mode → TxInMode mode → IO (SubmitResult (TxValidationErrorInMode mode))
- newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a = LocalStateQueryClient {
- runLocalStateQueryClient ∷ m (ClientStIdle block point query m a)
- data QueryInMode mode result where
- QueryCurrentEra ∷ ConsensusModeIsMultiEra mode → QueryInMode mode AnyCardanoEra
- QueryInEra ∷ EraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result)
- data QueryInEra era result where
- QueryByronUpdateState ∷ QueryInEra ByronEra ByronUpdateState
- QueryInShelleyBasedEra ∷ ShelleyBasedEra era → QueryInShelleyBasedEra era result → QueryInEra era result
- queryNodeLocalState ∷ ∀ mode result. LocalNodeConnectInfo mode → Maybe ChainPoint → QueryInMode mode result → IO (Either AcquireFailure result)
- getLocalChainTip ∷ LocalNodeConnectInfo mode → IO ChainTip
- data OperationalCertificate
- data OperationalCertificateIssueCounter
- data OperationalCertIssueError
- issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter)
- data GenesisKey
- data GenesisExtendedKey
- data GenesisDelegateKey
- data GenesisDelegateExtendedKey
- data GenesisUTxOKey
- genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn
- makeMIRCertificate ∷ MIRPot → MIRTarget → Certificate
- makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate
- data MIRTarget
- data UpdateProposal = UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo
- data ProtocolParametersUpdate = ProtocolParametersUpdate {
- protocolUpdateProtocolVersion ∷ Maybe (Natural, Natural)
- protocolUpdateDecentralization ∷ Maybe Rational
- protocolUpdateExtraPraosEntropy ∷ Maybe (Maybe PraosNonce)
- protocolUpdateMaxBlockHeaderSize ∷ Maybe Natural
- protocolUpdateMaxBlockBodySize ∷ Maybe Natural
- protocolUpdateMaxTxSize ∷ Maybe Natural
- protocolUpdateTxFeeFixed ∷ Maybe Natural
- protocolUpdateTxFeePerByte ∷ Maybe Natural
- protocolUpdateMinUTxOValue ∷ Maybe Lovelace
- protocolUpdateStakeAddressDeposit ∷ Maybe Lovelace
- protocolUpdateStakePoolDeposit ∷ Maybe Lovelace
- protocolUpdateMinPoolCost ∷ Maybe Lovelace
- protocolUpdatePoolRetireMaxEpoch ∷ Maybe EpochNo
- protocolUpdateStakePoolTargetNum ∷ Maybe Natural
- protocolUpdatePoolPledgeInfluence ∷ Maybe Rational
- protocolUpdateMonetaryExpansion ∷ Maybe Rational
- protocolUpdateTreasuryCut ∷ Maybe Rational
- makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal
- data PraosNonce
- makePraosNonce ∷ ByteString → PraosNonce
- newtype NetworkMagic = NetworkMagic {}
- toNetworkMagic ∷ NetworkId → NetworkMagic
- data SomeNodeClientProtocol where
- SomeNodeClientProtocol ∷ RunNode blk ⇒ ProtocolClient blk (BlockProtocol blk) → SomeNodeClientProtocol
Eras
A type used as a tag to distinguish the Byron era.
Instances
| HasTypeProxy ByronEra Source # | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras | |
data ShelleyEra Source #
A type used as a tag to distinguish the Shelley era.
Instances
| HasTypeProxy ShelleyEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType ShelleyEra Source # Methods proxyToAsType ∷ Proxy ShelleyEra → AsType ShelleyEra Source # | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras | |
data AllegraEra Source #
A type used as a tag to distinguish the Allegra era.
Instances
| HasTypeProxy AllegraEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType AllegraEra Source # Methods proxyToAsType ∷ Proxy AllegraEra → AsType AllegraEra Source # | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras | |
A type used as a tag to distinguish the Mary era.
Instances
| HasTypeProxy MaryEra Source # | |
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras | |
data CardanoEra era where Source #
This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
This can be used in combination with the IsCardanoEra class to get access
to this value.
In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.
Constructors
| ByronEra ∷ CardanoEra ByronEra | |
| ShelleyEra ∷ CardanoEra ShelleyEra | |
| AllegraEra ∷ CardanoEra AllegraEra | |
| MaryEra ∷ CardanoEra MaryEra |
Instances
class HasTypeProxy era ⇒ IsCardanoEra era where Source #
The class of Cardano eras. This allows uniform handling of all Cardano
eras, but also non-uniform by making case distinctions on the CardanoEra
constructors, or the CardanoEraStyle constructors via cardanoEraStyle.
Methods
cardanoEra ∷ CardanoEra era Source #
Instances
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data AnyCardanoEra where Source #
Constructors
| AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra |
Instances
| Bounded AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras | |
| Enum AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods succ ∷ AnyCardanoEra → AnyCardanoEra # pred ∷ AnyCardanoEra → AnyCardanoEra # toEnum ∷ Int → AnyCardanoEra # fromEnum ∷ AnyCardanoEra → Int # enumFrom ∷ AnyCardanoEra → [AnyCardanoEra] # enumFromThen ∷ AnyCardanoEra → AnyCardanoEra → [AnyCardanoEra] # enumFromTo ∷ AnyCardanoEra → AnyCardanoEra → [AnyCardanoEra] # enumFromThenTo ∷ AnyCardanoEra → AnyCardanoEra → AnyCardanoEra → [AnyCardanoEra] # | |
| Eq AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras | |
| Show AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → AnyCardanoEra → ShowS # show ∷ AnyCardanoEra → String # showList ∷ [AnyCardanoEra] → ShowS # | |
| ToJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ AnyCardanoEra → Value # toEncoding ∷ AnyCardanoEra → Encoding # toJSONList ∷ [AnyCardanoEra] → Value # toEncodingList ∷ [AnyCardanoEra] → Encoding # | |
anyCardanoEra ∷ CardanoEra era → AnyCardanoEra Source #
Like the AnyCardanoEra constructor but does not demand a IsCardanoEra
class constraint.
data InAnyCardanoEra thing where Source #
This pairs up some era-dependent type with a CardanoEra value that tells
us what era it is, but hides the era type. This is useful when the era is
not statically known, for example when deserialising from a file.
Constructors
| InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing |
Shelley-based eras
data ShelleyBasedEra era where Source #
While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.
Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.
Constructors
| ShelleyBasedEraShelley ∷ ShelleyBasedEra ShelleyEra | |
| ShelleyBasedEraAllegra ∷ ShelleyBasedEra AllegraEra | |
| ShelleyBasedEraMary ∷ ShelleyBasedEra MaryEra |
Instances
| Eq (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (/=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # | |
| Ord (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ ShelleyBasedEra era → ShelleyBasedEra era → Ordering # (<) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (<=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (>) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (>=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # max ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era # min ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era # | |
| Show (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → ShelleyBasedEra era → ShowS # show ∷ ShelleyBasedEra era → String # showList ∷ [ShelleyBasedEra era] → ShowS # | |
class (IsCardanoEra era, Crypto (ShelleyLedgerEra era) ~ StandardCrypto) ⇒ IsShelleyBasedEra era where Source #
The class of eras that are based on Shelley. This allows uniform handling
of Shelley-based eras, but also non-uniform by making case distinctions on
the ShelleyBasedEra constructors.
Methods
Instances
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data InAnyShelleyBasedEra thing where Source #
This pairs up some era-dependent type with a ShelleyBasedEra value that
tells us what era it is, but hides the era type. This is useful when the era
is not statically known, for example when deserialising from a file.
Constructors
| InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing |
data CardanoEraStyle era where Source #
This is the same essential information as CardanoEra but instead of a
flat set of alternative eras, it is factored into the legcy Byron era and
the current Shelley-based eras.
This way of factoring the eras is useful because in many cases the major differences are between the Byron and Shelley-based eras, and the Shelley-based eras can often be treated uniformly.
Constructors
| LegacyByronEra ∷ CardanoEraStyle ByronEra | |
| ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era |
Instances
| Eq (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (/=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # | |
| Ord (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ CardanoEraStyle era → CardanoEraStyle era → Ordering # (<) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (<=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (>) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (>=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # max ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era # min ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era # | |
| Show (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → CardanoEraStyle era → ShowS # show ∷ CardanoEraStyle era → String # showList ∷ [CardanoEraStyle era] → ShowS # | |
cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era Source #
The CardanoEraStyle for a CardanoEra.
Deprecated
type Shelley = ShelleyEra Source #
Deprecated: Use ShelleyEra or ShelleyAddr as appropriate
type Allegra = AllegraEra Source #
Deprecated: Use AllegraEra instead
Type tags
class HasTypeProxy t where Source #
Associated Types
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Methods
proxyToAsType ∷ Proxy t → AsType t Source #
Instances
Cryptographic key interface
class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole Source #
An interface for cryptographic keys used for signatures with a SigningKey
and a VerificationKey key.
This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.
Minimal complete definition
getVerificationKey, deterministicSigningKey, deterministicSigningKeySeedSize, verificationKeyHash
Instances
data family VerificationKey keyrole ∷ Type Source #
The type of cryptographic verification key, for each key role.
Instances
getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole Source #
Get the corresponding verification key from a signing key.
verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole Source #
castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB Source #
Change the role of a VerificationKey, if the representation permits.
castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB Source #
Change the role of a SigningKey, if the representation permits.
Generating keys
generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole) Source #
Generate a SigningKey using a seed from operating system entropy.
deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole Source #
Generate a SigningKey deterministically, given a Seed. The
required size of the seed is given by deterministicSigningKeySeedSize.
Hashes
In Cardano most keys are identified by their hash, and hashes are used in many other places.
data family Hash keyrole ∷ Type Source #
Instances
Payment addresses
Constructing and inspecting normal payment addresses
data Address addrtype Source #
Addresses are used as locations where assets live. The address determines the rights needed to spend assets at the address: in particular holding some signing key or being able to satisfy the conditions of a script.
There are currently two types of address:
- Byron addresses, which use the type tag
ByronAddr; and - Shelley addresses, which use the type tag
ShelleyAddr. Notably, Shelley addresses support scripts and stake delegation.
The address type is subtly from the ledger era in which each
address type is valid: while Byron addresses are the only choice in the
Byron era, the Shelley era and all subsequent eras support both Byron and
Shelley addresses. The Address type param only says the type of the address
(either Byron or Shelley). The AddressInEra type connects the address type
with the era in which it is supported.
Instances
A type used as a tag to distinguish Byron addresses.
Instances
| HasTypeProxy ByronAddr Source # | |
| SerialiseAsRawBytes (Address ByronAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseToRawBytes ∷ Address ByronAddr → ByteString Source # deserialiseFromRawBytes ∷ AsType (Address ByronAddr) → ByteString → Maybe (Address ByronAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
| data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data ShelleyAddr Source #
A type used as a tag to distinguish Shelley addresses.
Instances
| HasTypeProxy ShelleyAddr Source # | |
Defined in Cardano.Api.Address Associated Types data AsType ShelleyAddr Source # Methods proxyToAsType ∷ Proxy ShelleyAddr → AsType ShelleyAddr Source # | |
| SerialiseAsRawBytes (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address | |
| SerialiseAsBech32 (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods bech32PrefixFor ∷ Address ShelleyAddr → Text Source # bech32PrefixesPermitted ∷ AsType (Address ShelleyAddr) → [Text] Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
Constructors
| Mainnet | |
| Testnet !NetworkMagic |
Instances
Byron addresses
Byron-era payment keys. Used for Byron addresses and witnessing transactions that spend from these addresses.
These use Ed25519 but with a 32byte "chaincode" used in HD derivation.
The inclusion of the chaincode is a design mistake but one that cannot
be corrected for the Byron era. The Shelley era PaymentKeys do not include
a chaincode. It is safe to use a zero or random chaincode for new Byron keys.
This is a type level tag, used with other interfaces like Key.
Instances
data ByronKeyLegacy Source #
Instances
Shelley addresses
makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr Source #
data PaymentCredential Source #
Constructors
| PaymentCredentialByKey (Hash PaymentKey) | |
| PaymentCredentialByScript ScriptHash |
Instances
| Eq PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods | |
| Ord PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ PaymentCredential → PaymentCredential → Ordering # (<) ∷ PaymentCredential → PaymentCredential → Bool # (<=) ∷ PaymentCredential → PaymentCredential → Bool # (>) ∷ PaymentCredential → PaymentCredential → Bool # (>=) ∷ PaymentCredential → PaymentCredential → Bool # max ∷ PaymentCredential → PaymentCredential → PaymentCredential # min ∷ PaymentCredential → PaymentCredential → PaymentCredential # | |
| Show PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → PaymentCredential → ShowS # show ∷ PaymentCredential → String # showList ∷ [PaymentCredential] → ShowS # | |
data StakeAddressReference Source #
Constructors
| StakeAddressByValue StakeCredential | |
| StakeAddressByPointer StakeAddressPointer | |
| NoStakeAddress |
Instances
| Eq StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeAddressReference → StakeAddressReference → Bool # (/=) ∷ StakeAddressReference → StakeAddressReference → Bool # | |
| Show StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeAddressReference → ShowS # show ∷ StakeAddressReference → String # showList ∷ [StakeAddressReference] → ShowS # | |
data PaymentKey Source #
Shelley-era payment keys. Used for Shelley payment addresses and witnessing transactions that spend from these addresses.
This is a type level tag, used with other interfaces like Key.
Instances
data PaymentExtendedKey Source #
Shelley-era payment keys using extended ed25519 cryptographic keys.
They can be used for Shelley payment addresses and witnessing transactions that spend from these addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey PaymentKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey PaymentKey).
This is a type level tag, used with other interfaces like Key.
Instances
Addresses in any era
data AddressAny Source #
Either a Byron address or a Shelley address.
Sometimes we need to be able to work with either of the two types of address (Byron or Shelley addresses), but without reference to an era in which the address will be used. This type serves that purpose.
Constructors
| AddressByron !(Address ByronAddr) | |
| AddressShelley !(Address ShelleyAddr) |
Instances
Addresses in specific eras
data AddressInEra era where Source #
An Address that can be used in a particular ledger era.
All current ledger eras support Byron addresses. Shelley addresses are
supported in the ShelleyEra and later eras.
Constructors
| AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era |
Instances
data AddressTypeInEra addrtype era where Source #
Constructors
| ByronAddressInAnyEra ∷ AddressTypeInEra ByronAddr era | |
| ShelleyAddressInEra ∷ ShelleyBasedEra era → AddressTypeInEra ShelleyAddr era |
Instances
| Show (AddressTypeInEra addrtype era) Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → AddressTypeInEra addrtype era → ShowS # show ∷ AddressTypeInEra addrtype era → String # showList ∷ [AddressTypeInEra addrtype era] → ShowS # | |
byronAddressInEra ∷ Address ByronAddr → AddressInEra era Source #
shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era Source #
anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era Source #
anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era) Source #
toAddressAny ∷ Address addr → AddressAny Source #
makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era Source #
Stake addresses
Constructing and inspecting stake addresses
data StakeAddress Source #
Instances
data StakeCredential Source #
Instances
| Eq StakeCredential Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeCredential → StakeCredential → Bool # (/=) ∷ StakeCredential → StakeCredential → Bool # | |
| Ord StakeCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ StakeCredential → StakeCredential → Ordering # (<) ∷ StakeCredential → StakeCredential → Bool # (<=) ∷ StakeCredential → StakeCredential → Bool # (>) ∷ StakeCredential → StakeCredential → Bool # (>=) ∷ StakeCredential → StakeCredential → Bool # | |
| Show StakeCredential Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeCredential → ShowS # show ∷ StakeCredential → String # showList ∷ [StakeCredential] → ShowS # | |
Instances
data StakeExtendedKey Source #
Shelley-era stake keys using extended ed25519 cryptographic keys.
They can be used for Shelley stake addresses and witnessing transactions that use stake addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey StakeKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey StakeKey).
This is a type level tag, used with other interfaces like Key.
Instances
Currency values
Ada / Lovelace
Instances
| Enum Lovelace Source # | |
| Eq Lovelace Source # | |
| Num Lovelace Source # | |
| Ord Lovelace Source # | |
| Show Lovelace Source # | |
| Semigroup Lovelace Source # | |
| Monoid Lovelace Source # | |
| FromJSON Lovelace Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
Multi-asset values
Instances
| Eq Quantity Source # | |
| Num Quantity Source # | |
| Ord Quantity Source # | |
| Show Quantity Source # | |
| Semigroup Quantity Source # | |
| Monoid Quantity Source # | |
| FromJSON Quantity Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
Constructors
| PolicyId ScriptHash |
Instances
| Eq PolicyId Source # | |
| Ord PolicyId Source # | |
| Show PolicyId Source # | |
| IsString PolicyId Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → PolicyId # | |
| HasTypeProxy PolicyId Source # | |
| SerialiseAsRawBytes PolicyId Source # | |
Defined in Cardano.Api.Value Methods serialiseToRawBytes ∷ PolicyId → ByteString Source # deserialiseFromRawBytes ∷ AsType PolicyId → ByteString → Maybe PolicyId Source # | |
| data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
Constructors
| AssetName ByteString |
Instances
| Eq AssetName Source # | |
| Ord AssetName Source # | |
Defined in Cardano.Api.Value | |
| Show AssetName Source # | |
| IsString AssetName Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → AssetName # | |
| FromJSON AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| FromJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| HasTypeProxy AssetName Source # | |
| SerialiseAsRawBytes AssetName Source # | |
Defined in Cardano.Api.Value | |
| data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
Constructors
| AdaAssetId | |
| AssetId !PolicyId !AssetName |
Instances
negateValue ∷ Value → Value Source #
This lets you write a - b as a <> negateValue b.
newtype ValueNestedRep Source #
Constructors
| ValueNestedRep [ValueNestedBundle] |
Instances
| Eq ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods (==) ∷ ValueNestedRep → ValueNestedRep → Bool # (/=) ∷ ValueNestedRep → ValueNestedRep → Bool # | |
| Ord ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedRep → ValueNestedRep → Ordering # (<) ∷ ValueNestedRep → ValueNestedRep → Bool # (<=) ∷ ValueNestedRep → ValueNestedRep → Bool # (>) ∷ ValueNestedRep → ValueNestedRep → Bool # (>=) ∷ ValueNestedRep → ValueNestedRep → Bool # | |
| Show ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods showsPrec ∷ Int → ValueNestedRep → ShowS # show ∷ ValueNestedRep → String # showList ∷ [ValueNestedRep] → ShowS # | |
| FromJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
data ValueNestedBundle Source #
A bundle within a ValueNestedRep for a single PolicyId, or for the
special case of ada.
Constructors
| ValueNestedBundleAda Quantity | |
| ValueNestedBundle PolicyId (Map AssetName Quantity) |
Instances
| Eq ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods | |
| Ord ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedBundle → ValueNestedBundle → Ordering # (<) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (<=) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (>) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (>=) ∷ ValueNestedBundle → ValueNestedBundle → Bool # max ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle # min ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle # | |
| Show ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods showsPrec ∷ Int → ValueNestedBundle → ShowS # show ∷ ValueNestedBundle → String # showList ∷ [ValueNestedBundle] → ShowS # | |
Ada / Lovelace within multi-asset values
valueToLovelace ∷ Value → Maybe Lovelace Source #
Check if the Value consists of only Lovelace and no other assets,
and if so then return the Lovelace.
See also selectLovelace to select the Lovelace quantity from the Value,
ignoring other assets.
Blocks
Blocks in the context of an era
A blockchain block in a particular Cardano era.
Bundled Patterns
| pattern Block ∷ BlockHeader → [Tx era] → Block era | A block consists of a header and a body containing transactions. |
data BlockHeader Source #
Constructors
| BlockHeader !SlotNo !(Hash BlockHeader) !BlockNo |
Instances
Points on the chain
data ChainPoint Source #
Instances
| Eq ChainPoint Source # | |
Defined in Cardano.Api.Block | |
| Show ChainPoint Source # | |
Defined in Cardano.Api.Block Methods showsPrec ∷ Int → ChainPoint → ShowS # show ∷ ChainPoint → String # showList ∷ [ChainPoint] → ShowS # | |
Instances
| Enum EpochNo | |
Defined in Cardano.Slotting.Slot | |
| Eq EpochNo | |
| Num EpochNo | |
| Ord EpochNo | |
| Show EpochNo | |
| Generic EpochNo | |
| FromJSON EpochNo | |
Defined in Cardano.Slotting.Slot | |
| NoThunks EpochNo | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| FromCBOR EpochNo | |
| ToCBOR EpochNo | |
| Serialise EpochNo | |
Defined in Cardano.Slotting.Slot | |
| Condense EpochNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| type Rep EpochNo | |
Defined in Cardano.Slotting.Slot type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-b86b9b9d23851375571947a510bd8855b041f1489c12c369ae009448952b0f4d" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
Tip of the chain
This is like a ChainPoint but is conventionally used for the tip of the
chain: that is the most recent block at the end of the chain.
It also carries the BlockNo of the chain tip.
Constructors
| ChainTipAtGenesis | |
| ChainTip !SlotNo !(Hash BlockHeader) !BlockNo |
Instances
| Bounded BlockNo | |
| Enum BlockNo | |
Defined in Cardano.Slotting.Block | |
| Eq BlockNo | |
| Num BlockNo | |
| Ord BlockNo | |
| Show BlockNo | |
| Generic BlockNo | |
| NoThunks BlockNo | |
| FromCBOR BlockNo | |
| ToCBOR BlockNo | |
| Serialise BlockNo | |
Defined in Cardano.Slotting.Block | |
| Condense BlockNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| type Rep BlockNo | |
Defined in Cardano.Slotting.Block type Rep BlockNo = D1 ('MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.1.0.0-b86b9b9d23851375571947a510bd8855b041f1489c12c369ae009448952b0f4d" 'True) (C1 ('MetaCons "BlockNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
Building transactions
Building transactions
Constructing and inspecting transactions
Transaction bodies
Instances
| Eq (TxBody era) Source # | |
| Show (TxBody era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToCBOR ∷ TxBody era → ByteString Source # deserialiseFromCBOR ∷ AsType (TxBody era) → ByteString → Either DecoderError (TxBody era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods textEnvelopeType ∷ AsType (TxBody era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ TxBody era → TextEnvelopeDescr Source # | |
| data AsType (TxBody era) Source # | |
Defined in Cardano.Api.TxBody | |
makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either (TxBodyError era) (TxBody era) Source #
data TxBodyContent build era Source #
Constructors
| TxBodyContent | |
Fields
| |
data TxBodyError era Source #
Constructors
| TxBodyEmptyTxIns | |
| TxBodyEmptyTxOuts | |
| TxBodyOutputNegative Quantity (TxOut era) | |
| TxBodyOutputOverflow Quantity (TxOut era) | |
| TxBodyMetadataError [(Word64, TxMetadataRangeError)] | |
| TxBodyMintAdaError |
Instances
| Show (TxBodyError era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxBodyError era → ShowS # show ∷ TxBodyError era → String # showList ∷ [TxBodyError era] → ShowS # | |
| Error (TxBodyError era) Source # | |
Defined in Cardano.Api.TxBody Methods displayError ∷ TxBodyError era → String Source # | |
Transaction Ids
Constructors
| TxId (Hash StandardCrypto EraIndependentTxBody) |
Instances
| Eq TxId Source # | |
| Ord TxId Source # | |
| Show TxId Source # | |
| IsString TxId Source # | |
Defined in Cardano.Api.TxBody Methods fromString ∷ String → TxId # | |
| ToJSON TxId Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| HasTypeProxy TxId Source # | |
| SerialiseAsRawBytes TxId Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToRawBytes ∷ TxId → ByteString Source # deserialiseFromRawBytes ∷ AsType TxId → ByteString → Maybe TxId Source # | |
| data AsType TxId Source # | |
Defined in Cardano.Api.TxBody | |
Transaction inputs
Transaction outputs
Constructors
| TxOut (AddressInEra era) (TxOutValue era) |
Instances
| Eq (TxOut era) Source # | |
| Show (TxOut era) Source # | |
| Generic (TxOut era) Source # | |
| IsCardanoEra era ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| type Rep (TxOut era) Source # | |
Defined in Cardano.Api.TxBody type Rep (TxOut era) = D1 ('MetaData "TxOut" "Cardano.Api.TxBody" "cardano-api-1.26.1-inplace" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AddressInEra era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxOutValue era)))) | |
data TxOutValue era where Source #
Constructors
| TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era | |
| TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era |
Instances
Other transaction body types
Constructors
| TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era | |
| TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era |
Instances
data TxValidityLowerBound era where Source #
Constructors
| TxValidityNoLowerBound ∷ TxValidityLowerBound era | |
| TxValidityLowerBound ∷ ValidityLowerBoundSupportedInEra era → SlotNo → TxValidityLowerBound era |
Instances
| Eq (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool # (/=) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool # | |
| Show (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxValidityLowerBound era → ShowS # show ∷ TxValidityLowerBound era → String # showList ∷ [TxValidityLowerBound era] → ShowS # | |
data TxValidityUpperBound era where Source #
This was formerly known as the TTL.
Constructors
| TxValidityNoUpperBound ∷ ValidityNoUpperBoundSupportedInEra era → TxValidityUpperBound era | |
| TxValidityUpperBound ∷ ValidityUpperBoundSupportedInEra era → SlotNo → TxValidityUpperBound era |
Instances
| Eq (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool # (/=) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool # | |
| Show (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxValidityUpperBound era → ShowS # show ∷ TxValidityUpperBound era → String # showList ∷ [TxValidityUpperBound era] → ShowS # | |
Instances
| Bounded SlotNo | |
| Enum SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Eq SlotNo | |
| Num SlotNo | |
| Ord SlotNo | |
| Show SlotNo | |
| Generic SlotNo | |
| NFData SlotNo | |
Defined in Cardano.Slotting.Slot | |
| FromJSON SlotNo | |
Defined in Cardano.Slotting.Slot | |
| NoThunks SlotNo | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| FromCBOR SlotNo | |
| ToCBOR SlotNo | |
| Serialise SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Condense SlotNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| HasField "ttl" (TxBody era) SlotNo | |
Defined in Shelley.Spec.Ledger.TxBody | |
| HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block | |
Defined in Ouroboros.Network.AnchoredFragment Methods asAnchor ∷ block → Anchor block getAnchorMeasure ∷ Proxy block → Anchor block → WithOrigin SlotNo | |
| Anchorable (WithOrigin SlotNo) (HeaderState blk) (HeaderState blk) | |
Defined in Ouroboros.Consensus.HeaderValidation Methods asAnchor ∷ HeaderState blk → HeaderState blk getAnchorMeasure ∷ Proxy (HeaderState blk) → HeaderState blk → WithOrigin SlotNo | |
| GetTip l ⇒ Anchorable (WithOrigin SlotNo) (Checkpoint l) (Checkpoint l) | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory Methods asAnchor ∷ Checkpoint l → Checkpoint l getAnchorMeasure ∷ Proxy (Checkpoint l) → Checkpoint l → WithOrigin SlotNo | |
| Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
| HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
Defined in Shelley.Spec.Ledger.TxBody | |
| type Rep SlotNo | |
Defined in Cardano.Slotting.Slot type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-b86b9b9d23851375571947a510bd8855b041f1489c12c369ae009448952b0f4d" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
newtype EpochSlots #
Constructors
| EpochSlots | |
Fields | |
Instances
data TxMetadataInEra era where Source #
Constructors
| TxMetadataNone ∷ TxMetadataInEra era | |
| TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era |
Instances
| Eq (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool # (/=) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool # | |
| Show (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMetadataInEra era → ShowS # show ∷ TxMetadataInEra era → String # showList ∷ [TxMetadataInEra era] → ShowS # | |
data TxAuxScripts era where Source #
Constructors
| TxAuxScriptsNone ∷ TxAuxScripts era | |
| TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era |
Instances
| Eq (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxAuxScripts era → TxAuxScripts era → Bool # (/=) ∷ TxAuxScripts era → TxAuxScripts era → Bool # | |
| Show (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxAuxScripts era → ShowS # show ∷ TxAuxScripts era → String # showList ∷ [TxAuxScripts era] → ShowS # | |
data TxWithdrawals build era where Source #
Constructors
| TxWithdrawalsNone ∷ TxWithdrawals build era | |
| TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era |
Instances
| Eq (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool # (/=) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool # | |
| Show (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxWithdrawals build era → ShowS # show ∷ TxWithdrawals build era → String # showList ∷ [TxWithdrawals build era] → ShowS # | |
data TxCertificates build era where Source #
Constructors
| TxCertificatesNone ∷ TxCertificates build era | |
| TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era |
Instances
| Eq (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxCertificates build era → TxCertificates build era → Bool # (/=) ∷ TxCertificates build era → TxCertificates build era → Bool # | |
| Show (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxCertificates build era → ShowS # show ∷ TxCertificates build era → String # showList ∷ [TxCertificates build era] → ShowS # | |
data TxUpdateProposal era where Source #
Constructors
| TxUpdateProposalNone ∷ TxUpdateProposal era | |
| TxUpdateProposal ∷ UpdateProposalSupportedInEra era → UpdateProposal → TxUpdateProposal era |
Instances
| Eq (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool # (/=) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool # | |
| Show (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxUpdateProposal era → ShowS # show ∷ TxUpdateProposal era → String # showList ∷ [TxUpdateProposal era] → ShowS # | |
data TxMintValue build era where Source #
Constructors
| TxMintNone ∷ TxMintValue build era | |
| TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (Witness WitCtxMint era)) → TxMintValue build era |
Instances
| Eq (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMintValue build era → TxMintValue build era → Bool # (/=) ∷ TxMintValue build era → TxMintValue build era → Bool # | |
| Show (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMintValue build era → ShowS # show ∷ TxMintValue build era → String # showList ∷ [TxMintValue build era] → ShowS # | |
Building vs viewing transactions
data BuildTxWith build a where Source #
Constructors
| ViewTx ∷ BuildTxWith ViewTx a | |
| BuildTxWith ∷ a → BuildTxWith BuildTx a |
Instances
| Eq a ⇒ Eq (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ BuildTxWith build a → BuildTxWith build a → Bool # (/=) ∷ BuildTxWith build a → BuildTxWith build a → Bool # | |
| Show a ⇒ Show (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → BuildTxWith build a → ShowS # show ∷ BuildTxWith build a → String # showList ∷ [BuildTxWith build a] → ShowS # | |
Era-dependent transaction body features
data MultiAssetSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra.
Constructors
| MultiAssetInMaryEra ∷ MultiAssetSupportedInEra MaryEra | Multi-asset transactions are supported in the |
Instances
| Eq (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool # (/=) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool # | |
| Show (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → MultiAssetSupportedInEra era → ShowS # show ∷ MultiAssetSupportedInEra era → String # showList ∷ [MultiAssetSupportedInEra era] → ShowS # | |
| ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
data OnlyAdaSupportedInEra era where Source #
A representation of whether the era supports only ada transactions.
Prior to the Mary era only ada transactions are supported. Multi-assets are supported from the Mary era onwards.
This is the negation of MultiAssetSupportedInEra. It exists since we need
evidence to be positive.
Constructors
| AdaOnlyInByronEra ∷ OnlyAdaSupportedInEra ByronEra | |
| AdaOnlyInShelleyEra ∷ OnlyAdaSupportedInEra ShelleyEra | |
| AdaOnlyInAllegraEra ∷ OnlyAdaSupportedInEra AllegraEra |
Instances
| Eq (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool # (/=) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool # | |
| Show (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → OnlyAdaSupportedInEra era → ShowS # show ∷ OnlyAdaSupportedInEra era → String # showList ∷ [OnlyAdaSupportedInEra era] → ShowS # | |
data TxFeesExplicitInEra era where Source #
A representation of whether the era requires explicitly specified fees in transactions.
The Byron era tx fees are implicit (as the difference bettween the sum of outputs and sum of inputs), but all later eras the fees are specified in the transaction explicitly.
Constructors
| TxFeesExplicitInShelleyEra ∷ TxFeesExplicitInEra ShelleyEra | |
| TxFeesExplicitInAllegraEra ∷ TxFeesExplicitInEra AllegraEra | |
| TxFeesExplicitInMaryEra ∷ TxFeesExplicitInEra MaryEra |
Instances
| Eq (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool # (/=) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool # | |
| Show (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxFeesExplicitInEra era → ShowS # show ∷ TxFeesExplicitInEra era → String # showList ∷ [TxFeesExplicitInEra era] → ShowS # | |
data TxFeesImplicitInEra era where Source #
A representation of whether the era requires implicitly specified fees in transactions.
This is the negation of TxFeesExplicitInEra.
Constructors
| TxFeesImplicitInByronEra ∷ TxFeesImplicitInEra ByronEra |
Instances
| Eq (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool # (/=) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool # | |
| Show (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxFeesImplicitInEra era → ShowS # show ∷ TxFeesImplicitInEra era → String # showList ∷ [TxFeesImplicitInEra era] → ShowS # | |
data ValidityUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with an upper bound on the range of slots in which they are valid.
The Shelley and subsequent eras support an upper bound on the validity range. In the Shelley era specifically it is actually required. It is optional in later eras.
Constructors
Instances
| Eq (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool # (/=) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool # | |
| Show (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityUpperBoundSupportedInEra era → ShowS # show ∷ ValidityUpperBoundSupportedInEra era → String # showList ∷ [ValidityUpperBoundSupportedInEra era] → ShowS # | |
data ValidityNoUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions having no upper bound on the range of slots in which they are valid.
Note that the ShelleyEra does not support omitting a validity upper
bound. It was introduced as a required field in Shelley and then made
optional in Allegra and subsequent eras.
The Byron era supports this by virtue of the fact that it does not support validity ranges at all.
Constructors
Instances
| Eq (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool # (/=) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool # | |
| Show (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityNoUpperBoundSupportedInEra era → ShowS # show ∷ ValidityNoUpperBoundSupportedInEra era → String # showList ∷ [ValidityNoUpperBoundSupportedInEra era] → ShowS # | |
data ValidityLowerBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with a lower bound on the range of slots in which they are valid.
The Allegra and subsequent eras support an optional lower bound on the
validity range. No equivalent of ValidityNoUpperBoundSupportedInEra is
needed since all eras support having no lower bound.
Constructors
| ValidityLowerBoundInAllegraEra ∷ ValidityLowerBoundSupportedInEra AllegraEra | |
| ValidityLowerBoundInMaryEra ∷ ValidityLowerBoundSupportedInEra MaryEra |
Instances
| Eq (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool # (/=) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool # | |
| Show (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityLowerBoundSupportedInEra era → ShowS # show ∷ ValidityLowerBoundSupportedInEra era → String # showList ∷ [ValidityLowerBoundSupportedInEra era] → ShowS # | |
data TxMetadataSupportedInEra era where Source #
A representation of whether the era supports transaction metadata.
Transaction metadata is supported from the Shelley era onwards.
Constructors
| TxMetadataInShelleyEra ∷ TxMetadataSupportedInEra ShelleyEra | |
| TxMetadataInAllegraEra ∷ TxMetadataSupportedInEra AllegraEra | |
| TxMetadataInMaryEra ∷ TxMetadataSupportedInEra MaryEra |
Instances
| Eq (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool # (/=) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool # | |
| Show (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMetadataSupportedInEra era → ShowS # show ∷ TxMetadataSupportedInEra era → String # showList ∷ [TxMetadataSupportedInEra era] → ShowS # | |
data AuxScriptsSupportedInEra era where Source #
A representation of whether the era supports auxiliary scripts in transactions.
Auxiliary scripts are supported from the Allegra era onwards.
Constructors
| AuxScriptsInAllegraEra ∷ AuxScriptsSupportedInEra AllegraEra | |
| AuxScriptsInMaryEra ∷ AuxScriptsSupportedInEra MaryEra |
Instances
| Eq (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool # (/=) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool # | |
| Show (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → AuxScriptsSupportedInEra era → ShowS # show ∷ AuxScriptsSupportedInEra era → String # showList ∷ [AuxScriptsSupportedInEra era] → ShowS # | |
data WithdrawalsSupportedInEra era where Source #
A representation of whether the era supports withdrawals from reward accounts.
The Shelley and subsequent eras support stake addresses, their associated reward accounts and support for withdrawals from them.
Constructors
| WithdrawalsInShelleyEra ∷ WithdrawalsSupportedInEra ShelleyEra | |
| WithdrawalsInAllegraEra ∷ WithdrawalsSupportedInEra AllegraEra | |
| WithdrawalsInMaryEra ∷ WithdrawalsSupportedInEra MaryEra |
Instances
| Eq (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool # (/=) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool # | |
| Show (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → WithdrawalsSupportedInEra era → ShowS # show ∷ WithdrawalsSupportedInEra era → String # showList ∷ [WithdrawalsSupportedInEra era] → ShowS # | |
data CertificatesSupportedInEra era where Source #
A representation of whether the era supports Certificates embedded in
transactions.
The Shelley and subsequent eras support such certificates.
Constructors
| CertificatesInShelleyEra ∷ CertificatesSupportedInEra ShelleyEra | |
| CertificatesInAllegraEra ∷ CertificatesSupportedInEra AllegraEra | |
| CertificatesInMaryEra ∷ CertificatesSupportedInEra MaryEra |
Instances
| Eq (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool # (/=) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool # | |
| Show (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → CertificatesSupportedInEra era → ShowS # show ∷ CertificatesSupportedInEra era → String # showList ∷ [CertificatesSupportedInEra era] → ShowS # | |
data UpdateProposalSupportedInEra era where Source #
A representation of whether the era supports UpdateProposals embedded in
transactions.
The Shelley and subsequent eras support such update proposals. They Byron era has a notion of an update proposal, but it is a standalone chain object and not embedded in a transaction.
Constructors
Instances
| Eq (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool # (/=) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool # | |
| Show (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → UpdateProposalSupportedInEra era → ShowS # show ∷ UpdateProposalSupportedInEra era → String # showList ∷ [UpdateProposalSupportedInEra era] → ShowS # | |
Feature availability functions
multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era) Source #
txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era) Source #
validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era) Source #
validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era) Source #
validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era) Source #
txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era) Source #
auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era) Source #
withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era) Source #
certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era) Source #
Signing transactions
Creating transaction witnesses one by one, or all in one go.
Bundled Patterns
| pattern Tx ∷ TxBody era → [KeyWitness era] → Tx era |
Instances
| Eq (Tx era) Source # | |
| Show (Tx era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (Tx era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods serialiseToCBOR ∷ Tx era → ByteString Source # deserialiseFromCBOR ∷ AsType (Tx era) → ByteString → Either DecoderError (Tx era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods textEnvelopeType ∷ AsType (Tx era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Tx era → TextEnvelopeDescr Source # | |
| data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx | |
getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era] Source #
Signing in one go
signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era Source #
Incremental signing and separate witnesses
makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era Source #
data KeyWitness era Source #
Instances
makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → KeyWitness ByronEra Source #
makeByronTransaction ∷ [TxIn] → [TxOut ByronEra] → Either (TxBodyError ByronEra) (TxBody ByronEra) Source #
Deprecated: Use makeTransactionBody
Transitional function to help the CLI move to the updated TxBody API.
data ShelleyWitnessSigningKey Source #
Constructors
makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → KeyWitness era Source #
makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → KeyWitness era Source #
Fee calculation
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Lovelace |
For a concrete fully-constructed transaction, determine the minimum fee that it needs to pay.
This function is simple, but if you are doing input selection then you probably want to consider estimateTransactionFee.
estimateTransactionFee Source #
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ NetworkId | |
| → Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Int | The number of extra UTxO transaction inputs |
| → Int | The number of extra transaction outputs |
| → Int | The number of extra Shelley key witnesses |
| → Int | The number of extra Byron key witnesses |
| → Lovelace |
This can estimate what the transaction fee will be, based on a starting base transaction, plus the numbers of the additional components of the transaction that may be added.
So for example with wallet coin selection, the base transaction should contain all the things not subject to coin selection (such as script inputs, metadata, withdrawals, certs etc)
Transaction metadata
Embedding additional structured data within transactions.
newtype TxMetadata Source #
Constructors
| TxMetadata (Map Word64 TxMetadataValue) |
Instances
Constructing metadata
data TxMetadataValue Source #
Constructors
| TxMetaNumber Integer | |
| TxMetaBytes ByteString | |
| TxMetaText Text | |
| TxMetaList [TxMetadataValue] | |
| TxMetaMap [(TxMetadataValue, TxMetadataValue)] |
Instances
| Eq TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods (==) ∷ TxMetadataValue → TxMetadataValue → Bool # (/=) ∷ TxMetadataValue → TxMetadataValue → Bool # | |
| Ord TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods compare ∷ TxMetadataValue → TxMetadataValue → Ordering # (<) ∷ TxMetadataValue → TxMetadataValue → Bool # (<=) ∷ TxMetadataValue → TxMetadataValue → Bool # (>) ∷ TxMetadataValue → TxMetadataValue → Bool # (>=) ∷ TxMetadataValue → TxMetadataValue → Bool # | |
| Show TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataValue → ShowS # show ∷ TxMetadataValue → String # showList ∷ [TxMetadataValue] → ShowS # | |
Validating metadata
validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] () Source #
Validate transaction metadata. This is for use with existing constructed metadata values, e.g. constructed manually or decoded from CBOR directly.
data TxMetadataRangeError Source #
An error in transaction metadata due to an out-of-range value.
Constructors
| TxMetadataNumberOutOfRange !Integer | The number is outside the maximum range of |
| TxMetadataTextTooLong !Int | The length of a text string metadatum value exceeds the maximum of 64 bytes as UTF8. |
| TxMetadataBytesTooLong !Int | The length of a byte string metadatum value exceeds the maximum of 64 bytes. |
Instances
| Eq TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataRangeError → ShowS # show ∷ TxMetadataRangeError → String # showList ∷ [TxMetadataRangeError] → ShowS # | |
| Error TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Converstion to/from JSON
data TxMetadataJsonSchema Source #
Tx metadata is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string.
We provide two different mappings between tx metadata and JSON, useful for different purposes:
- A mapping that allows almost any JSON value to be converted into tx metadata. This does not require a specific JSON schema for the input. It does not expose the full representation capability of tx metadata.
- A mapping that exposes the full representation capability of tx metadata, but relies on a specific JSON schema for the input JSON.
In the "no schema" mapping, the idea is that (almost) any JSON can be turned into tx metadata and then converted back, without loss. That is, we can round-trip the JSON.
The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths
The approach for this mapping is to use whichever representation as tx metadata is most compact. In particular:
- JSON lists and maps represented as CBOR lists and maps
- JSON strings represented as CBOR strings
- JSON hex strings with "0x" prefix represented as CBOR byte strings
- JSON integer numbers represented as CBOR signed or unsigned numbers
- JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.
The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).
In the "detailed schema" mapping, the idea is that we expose the full representation capability of the tx metadata in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any tx metadata can be converted into the JSON and back without loss. That is we can round-trip the tx metadata via the JSON and also round-trip schema-compliant JSON via tx metadata.
Constructors
| TxMetadataJsonNoSchema | Use the "no schema" mapping between JSON and tx metadata as described above. |
| TxMetadataJsonDetailedSchema | Use the "detailed schema" mapping between JSON and tx metadata as described above. |
Instances
| Eq TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonSchema → ShowS # show ∷ TxMetadataJsonSchema → String # showList ∷ [TxMetadataJsonSchema] → ShowS # | |
metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata Source #
Convert a value from JSON into tx metadata, using the given choice of mapping between JSON and tx metadata.
This may fail with a conversion error if the JSON is outside the supported
subset for the chosen mapping. See TxMetadataJsonSchema for the details.
metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value Source #
Convert a tx metadata value into JSON , using the given choice of mapping between JSON and tx metadata.
This conversion is total but is not necessarily invertible.
See TxMetadataJsonSchema for the details.
metadataValueToJsonNoSchema ∷ TxMetadataValue → Value Source #
data TxMetadataJsonError Source #
Constructors
| TxMetadataJsonToplevelNotMap | |
| TxMetadataJsonToplevelBadKey !Text | |
| TxMetadataJsonSchemaError !Word64 !Value !TxMetadataJsonSchemaError | |
| TxMetadataRangeError !Word64 !Value !TxMetadataRangeError |
Instances
| Eq TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonError → ShowS # show ∷ TxMetadataJsonError → String # showList ∷ [TxMetadataJsonError] → ShowS # | |
| Error TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
data TxMetadataJsonSchemaError Source #
Constructors
Instances
| Eq TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Show TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonSchemaError → ShowS # | |
| Error TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Certificates
data Certificate Source #
Instances
Registering stake address and delegating
Certificates that are embedded in transactions for registering and unregistering stake address, and for setting the stake pool delegation choice for a stake address.
Registering stake pools
Certificates that are embedded in transactions for registering and retiring stake pools. This includes updating the stake pool parameters.
data StakePoolParameters Source #
Instances
| Eq StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods | |
| Show StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolParameters → ShowS # show ∷ StakePoolParameters → String # showList ∷ [StakePoolParameters] → ShowS # | |
data StakePoolRelay Source #
Instances
| Eq StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods (==) ∷ StakePoolRelay → StakePoolRelay → Bool # (/=) ∷ StakePoolRelay → StakePoolRelay → Bool # | |
| Show StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolRelay → ShowS # show ∷ StakePoolRelay → String # showList ∷ [StakePoolRelay] → ShowS # | |
data StakePoolMetadataReference Source #
Instances
| Eq StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate | |
| Show StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolMetadataReference → ShowS # | |
Stake pool off-chain metadata
data StakePoolMetadata Source #
A representation of the required fields for off-chain stake pool metadata.
Instances
validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata) Source #
Decode and validate the provided JSON-encoded bytes as StakePoolMetadata.
Return the decoded metadata and the hash of the original bytes.
data StakePoolMetadataValidationError Source #
A stake pool metadata validation error.
Instances
Scripts
Both PaymentCredentials and StakeCredentials can use scripts.
Script languages
data SimpleScriptV1 Source #
The original simple script language which supports
- require a signature from a given key (by verification key hash)
- n-way and combinator
- n-way or combinator
- m-of-n combinator
This version of the language was introduced in the ShelleyEra.
Instances
| HasTypeProxy SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV1 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV1 → AsType SimpleScriptV1 Source # | |
| IsSimpleScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data SimpleScriptV2 Source #
The second version of the simple script language. It has all the features
of SimpleScriptV1 plus new atomic predicates:
- require the time be before a given slot number
- require the time be after a given slot number
This version of the language was introduced in the AllegraEra.
Instances
| HasTypeProxy SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV2 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV2 → AsType SimpleScriptV2 Source # | |
| IsSimpleScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data ScriptLanguage lang where Source #
Constructors
| SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang | |
| PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang |
Instances
| Eq (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool # (/=) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool # | |
| Show (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptLanguage lang → ShowS # show ∷ ScriptLanguage lang → String # showList ∷ [ScriptLanguage lang] → ShowS # | |
| TestEquality ScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). ScriptLanguage a → ScriptLanguage b → Maybe (a :~: b) # | |
data SimpleScriptVersion lang where Source #
Constructors
| SimpleScriptV1 ∷ SimpleScriptVersion SimpleScriptV1 | |
| SimpleScriptV2 ∷ SimpleScriptVersion SimpleScriptV2 |
Instances
| Eq (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool # (/=) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool # | |
| Show (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → SimpleScriptVersion lang → ShowS # show ∷ SimpleScriptVersion lang → String # showList ∷ [SimpleScriptVersion lang] → ShowS # | |
| TestEquality SimpleScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). SimpleScriptVersion a → SimpleScriptVersion b → Maybe (a :~: b) # | |
data PlutusScriptVersion lang Source #
Instances
| Eq (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool # (/=) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool # | |
| Show (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → PlutusScriptVersion lang → ShowS # show ∷ PlutusScriptVersion lang → String # showList ∷ [PlutusScriptVersion lang] → ShowS # | |
| TestEquality PlutusScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). PlutusScriptVersion a → PlutusScriptVersion b → Maybe (a :~: b) # | |
data AnyScriptLanguage where Source #
Constructors
| AnyScriptLanguage ∷ ScriptLanguage lang → AnyScriptLanguage |
Instances
| Bounded AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script | |
| Enum AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods succ ∷ AnyScriptLanguage → AnyScriptLanguage # pred ∷ AnyScriptLanguage → AnyScriptLanguage # toEnum ∷ Int → AnyScriptLanguage # fromEnum ∷ AnyScriptLanguage → Int # enumFrom ∷ AnyScriptLanguage → [AnyScriptLanguage] # enumFromThen ∷ AnyScriptLanguage → AnyScriptLanguage → [AnyScriptLanguage] # enumFromTo ∷ AnyScriptLanguage → AnyScriptLanguage → [AnyScriptLanguage] # enumFromThenTo ∷ AnyScriptLanguage → AnyScriptLanguage → AnyScriptLanguage → [AnyScriptLanguage] # | |
| Eq AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods | |
| Show AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → AnyScriptLanguage → ShowS # show ∷ AnyScriptLanguage → String # showList ∷ [AnyScriptLanguage] → ShowS # | |
class HasTypeProxy lang ⇒ IsScriptLanguage lang where Source #
Methods
scriptLanguage ∷ ScriptLanguage lang Source #
Instances
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
Scripts in a specific language
data Script lang where Source #
A script in a particular language.
See also ScriptInAnyLang for a script in any of the languages that is available within
a particular era.
See also ScriptInEra for a script in a language that is available within
a particular era.
Constructors
| SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang | |
| PlutusScript ∷ !(PlutusScriptVersion lang) → () → Script lang |
Instances
| Eq (Script lang) Source # | |
| Show (Script lang) Source # | |
| IsScriptLanguage lang ⇒ FromJSON (Script lang) Source # | |
Defined in Cardano.Api.Script | |
| ToJSON (Script lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ Script lang → Value # toEncoding ∷ Script lang → Encoding # toJSONList ∷ [Script lang] → Value # toEncodingList ∷ [Script lang] → Encoding # | |
| HasTypeProxy lang ⇒ HasTypeProxy (Script lang) Source # | |
| IsScriptLanguage lang ⇒ SerialiseAsCBOR (Script lang) Source # | |
Defined in Cardano.Api.Script Methods serialiseToCBOR ∷ Script lang → ByteString Source # deserialiseFromCBOR ∷ AsType (Script lang) → ByteString → Either DecoderError (Script lang) Source # | |
| IsScriptLanguage lang ⇒ HasTextEnvelope (Script lang) Source # | |
Defined in Cardano.Api.Script Methods textEnvelopeType ∷ AsType (Script lang) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Script lang → TextEnvelopeDescr Source # | |
| data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
Scripts in any language
data ScriptInAnyLang where Source #
Sometimes it is necessary to handle all languages without making static type distinctions between languages. For example, when reading external input, or before the era context is known.
Use toScriptInEra to convert to a script in the context of an era.
Constructors
| ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang |
Instances
toScriptInAnyLang ∷ Script lang → ScriptInAnyLang Source #
Convert a script in a specific statically-known language to a
ScriptInAnyLang.
No inverse to this is provided, just do case analysis on the ScriptLanguage
field within the ScriptInAnyLang constructor.
Scripts in a specific era
data ScriptInEra era where Source #
Constructors
| ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era |
Instances
toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era) Source #
Given a target era and a script in some language, check if the language is
supported in that era, and if so return a ScriptInEra.
eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era Source #
Use of a script in an era as a witness
data WitCtxTxIn Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness a transaction input.
data WitCtxMint Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness minting.
data WitCtxStake Source #
A tag type for the context in which a script is used in a transaction.
This type tags the context as being to witness the use of stake addresses in both certificates and withdrawals.
data ScriptWitness witctx era where Source #
A use of a script within a transaction body to witness that something is being used in an authorised manner. That can be
- spending a transaction input
- minting tokens
- using a certificate (stake address certs specifically)
- withdrawing from a reward account
For simple script languages, the use of the script is the same in all contexts. For Plutus scripts, using a script involves supplying a redeemer. In addition, Plutus scripts used for spending inputs must also supply the datum value used when originally creating the TxOut that is now being spent.
Constructors
| SimpleScriptWitness ∷ ScriptLanguageInEra lang era → SimpleScriptVersion lang → SimpleScript lang → ScriptWitness witctx era |
Instances
| Eq (ScriptWitness witctx era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptWitness witctx era → ScriptWitness witctx era → Bool # (/=) ∷ ScriptWitness witctx era → ScriptWitness witctx era → Bool # | |
| Show (ScriptWitness witctx era) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptWitness witctx era → ShowS # show ∷ ScriptWitness witctx era → String # showList ∷ [ScriptWitness witctx era] → ShowS # | |
data Witness witctx era where Source #
Constructors
| KeyWitness ∷ KeyWitnessInCtx witctx → Witness witctx era | |
| ScriptWitness ∷ ScriptWitnessInCtx witctx → ScriptWitness witctx era → Witness witctx era |
data KeyWitnessInCtx witctx where Source #
Constructors
| KeyWitnessForSpending ∷ KeyWitnessInCtx WitCtxTxIn | |
| KeyWitnessForStakeAddr ∷ KeyWitnessInCtx WitCtxStake |
Instances
| Eq (KeyWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ KeyWitnessInCtx witctx → KeyWitnessInCtx witctx → Bool # (/=) ∷ KeyWitnessInCtx witctx → KeyWitnessInCtx witctx → Bool # | |
| Show (KeyWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → KeyWitnessInCtx witctx → ShowS # show ∷ KeyWitnessInCtx witctx → String # showList ∷ [KeyWitnessInCtx witctx] → ShowS # | |
data ScriptWitnessInCtx witctx where Source #
Constructors
| ScriptWitnessForSpending ∷ ScriptWitnessInCtx WitCtxTxIn | |
| ScriptWitnessForMinting ∷ ScriptWitnessInCtx WitCtxMint | |
| ScriptWitnessForStakeAddr ∷ ScriptWitnessInCtx WitCtxStake |
Instances
| Eq (ScriptWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptWitnessInCtx witctx → ScriptWitnessInCtx witctx → Bool # (/=) ∷ ScriptWitnessInCtx witctx → ScriptWitnessInCtx witctx → Bool # | |
| Show (ScriptWitnessInCtx witctx) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptWitnessInCtx witctx → ShowS # show ∷ ScriptWitnessInCtx witctx → String # showList ∷ [ScriptWitnessInCtx witctx] → ShowS # | |
Languages supported in each era
data ScriptLanguageInEra lang era where Source #
Constructors
Instances
| Eq (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool # (/=) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool # | |
| Show (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptLanguageInEra lang era → ShowS # show ∷ ScriptLanguageInEra lang era → String # showList ∷ [ScriptLanguageInEra lang era] → ShowS # | |
scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era) Source #
Check if a given script language is supported in a given era, and if so return the evidence.
languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang Source #
eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era Source #
Simple scripts
Making multi-signature and time-lock scripts.
data SimpleScript lang where Source #
Constructors
| RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang | |
| RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang |
Instances
| Eq (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ SimpleScript lang → SimpleScript lang → Bool # (/=) ∷ SimpleScript lang → SimpleScript lang → Bool # | |
| Show (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → SimpleScript lang → ShowS # show ∷ SimpleScript lang → String # showList ∷ [SimpleScript lang] → ShowS # | |
| IsSimpleScriptLanguage lang ⇒ FromJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods parseJSON ∷ Value → Parser (SimpleScript lang) # parseJSONList ∷ Value → Parser [SimpleScript lang] # | |
| ToJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ SimpleScript lang → Value # toEncoding ∷ SimpleScript lang → Encoding # toJSONList ∷ [SimpleScript lang] → Value # toEncodingList ∷ [SimpleScript lang] → Encoding # | |
data TimeLocksSupported lang where Source #
Time lock feature in the SimpleScript language.
The constructors of this type serve as evidence that the timelocks feature is supported in particular versions of the language.
Constructors
| TimeLocksInSimpleScriptV2 ∷ TimeLocksSupported SimpleScriptV2 |
Instances
| Eq (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool # (/=) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool # | |
| Show (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → TimeLocksSupported lang → ShowS # show ∷ TimeLocksSupported lang → String # showList ∷ [TimeLocksSupported lang] → ShowS # | |
timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang) Source #
adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang') Source #
Try converting the SimpleScript into a different version of the language.
This will work when the script only uses the features of the target language
version. For example converting from SimpleScriptV2 to SimpleScriptV1
will work if the script happens not to use time locks feature. On the other
hand converting SimpleScriptV1 to SimpleScriptV2 will always work because
it is backwards compatible.
Script addresses
Making addresses from scripts.
data ScriptHash Source #
We have this type separate from the Hash type to avoid the script
hash type being parametrised by the era. The representation is era
independent, and there are many places where we want to use a script
hash where we don't want things to be era-parametrised.
Instances
| Eq ScriptHash Source # | |
Defined in Cardano.Api.Script | |
| Ord ScriptHash Source # | |
Defined in Cardano.Api.Script Methods compare ∷ ScriptHash → ScriptHash → Ordering # (<) ∷ ScriptHash → ScriptHash → Bool # (<=) ∷ ScriptHash → ScriptHash → Bool # (>) ∷ ScriptHash → ScriptHash → Bool # (>=) ∷ ScriptHash → ScriptHash → Bool # max ∷ ScriptHash → ScriptHash → ScriptHash # min ∷ ScriptHash → ScriptHash → ScriptHash # | |
| Show ScriptHash Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptHash → ShowS # show ∷ ScriptHash → String # showList ∷ [ScriptHash] → ShowS # | |
| IsString ScriptHash Source # | |
Defined in Cardano.Api.Script Methods fromString ∷ String → ScriptHash # | |
| HasTypeProxy ScriptHash Source # | |
Defined in Cardano.Api.Script Associated Types data AsType ScriptHash Source # Methods proxyToAsType ∷ Proxy ScriptHash → AsType ScriptHash Source # | |
| SerialiseAsRawBytes ScriptHash Source # | |
Defined in Cardano.Api.Script | |
| data AsType ScriptHash Source # | |
Defined in Cardano.Api.Script | |
hashScript ∷ Script lang → ScriptHash Source #
Serialisation
Support for serialising data in JSON, CBOR and text files.
CBOR
class HasTypeProxy a ⇒ SerialiseAsCBOR a Source #
Instances
Minimal complete definition
Instances
class Typeable a ⇒ FromCBOR a #
Minimal complete definition
Instances
| FromCBOR Bool | |
| FromCBOR Float | |
| FromCBOR Int | |
| FromCBOR Int32 | |
| FromCBOR Int64 | |
| FromCBOR Integer | |
| FromCBOR Natural | |
| FromCBOR Word | |
| FromCBOR Word8 | |
| FromCBOR Word16 | |
| FromCBOR Word32 | |
| FromCBOR Word64 | |
| FromCBOR () | |
| FromCBOR ByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR ShortByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR Nano | |
| FromCBOR Pico | |
| FromCBOR Void | |
| FromCBOR Text | |
| FromCBOR NominalDiffTime | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR BlockNo | |
| FromCBOR LByteString | |
| FromCBOR EpochNo | |
| FromCBOR SlotNo | |
| FromCBOR Raw | |
| FromCBOR Coin | |
| FromCBOR UnitInterval | |
| FromCBOR ProtVer | |
| FromCBOR Likelihood | |
| FromCBOR Ptr | |
| FromCBOR Nonce | |
| FromCBOR ValidityInterval | |
| FromCBOR AssetName | |
| FromCBOR Desirability | |
| FromCBOR StakePoolRelay | |
| FromCBOR PoolMetadata | |
| FromCBOR Network | |
| FromCBOR Metadatum | |
| FromCBOR ByronHash | |
| FromCBOR KESPeriod | |
| FromCBOR ActiveSlotCoeff | |
| FromCBOR EpochAndSlotCount | |
| FromCBOR EpochNumber | |
| FromCBOR EpochSlots | |
Defined in Cardano.Chain.Slotting.EpochSlots | |
| FromCBOR SlotCount | |
| FromCBOR SlotNumber | |
| FromCBOR CompactAddress | |
| FromCBOR ProtocolParameters | |
| FromCBOR ProtocolVersion | |
| FromCBOR ProtocolMagicId | |
| FromCBOR Certificate | |
| FromCBOR SigningKey | |
| FromCBOR SoftwareVersion | |
| FromCBOR VerificationKey | |
| FromCBOR KeyHash | |
| FromCBOR GenesisHash | |
| FromCBOR CandidateProtocolUpdate | |
| FromCBOR Endorsement | |
| FromCBOR ApplyMempoolPayloadErr | |
Defined in Cardano.Chain.Byron.API.Mempool | |
| FromCBOR Tx | |
| FromCBOR Proposal | |
| FromCBOR Vote | |
| FromCBOR ChainValidationState | |
| FromCBOR Map | |
| FromCBOR ScheduledDelegation | |
| FromCBOR State | |
| FromCBOR UTxO | |
| FromCBOR Error | |
| FromCBOR ToSign | |
| FromCBOR Lovelace | |
| FromCBOR Point | |
| FromCBOR Proof | |
| FromCBOR SignKey | |
| FromCBOR VerKey | |
| FromCBOR RedeemVerificationKey | |
| FromCBOR RedeemSigningKey | |
| FromCBOR ChainDifficulty | |
| FromCBOR Proof | |
| FromCBOR SscPayload | |
| FromCBOR ProposalBody | |
| FromCBOR TxInWitness | |
| FromCBOR Body | |
| FromCBOR TxPayload | |
| FromCBOR Payload | |
| FromCBOR Payload | |
| FromCBOR BlockSignature | |
| FromCBOR TxProof | |
| FromCBOR SscProof | |
| FromCBOR CompactTxIn | |
| FromCBOR CompactTxOut | |
| FromCBOR State | |
| FromCBOR UTxOValidationError | |
| FromCBOR BlockCount | |
| FromCBOR ApplicationName | |
| FromCBOR ApplicationVersion | |
| FromCBOR ProtocolUpdateProposal | |
| FromCBOR SoftwareUpdateProposal | |
| FromCBOR Error | |
| FromCBOR HDAddressPayload | |
| FromCBOR NetworkMagic | |
| FromCBOR AddrSpendingData | |
| FromCBOR AddrType | |
| FromCBOR Address | |
| FromCBOR Address' | |
| FromCBOR LovelaceError | |
| FromCBOR LovelacePortion | |
| FromCBOR TxFeePolicy | |
| FromCBOR TxSizeLinear | |
| FromCBOR State | |
| FromCBOR State | |
| FromCBOR CompactTxId | |
| FromCBOR TxIn | |
| FromCBOR TxOut | |
| FromCBOR TxAux | |
| FromCBOR TxSigData | |
| FromCBOR UTxOError | |
| FromCBOR ApplicationNameError | |
| FromCBOR InstallerHash | |
| FromCBOR SystemTag | |
| FromCBOR ProtocolParametersUpdate | |
| FromCBOR SoftforkRule | |
| FromCBOR SoftwareVersionError | |
| FromCBOR SystemTagError | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Adopted | |
| FromCBOR TicknState | |
| FromCBOR ChainCode | |
| FromCBOR DnsName | |
| FromCBOR Port | |
| FromCBOR Url | |
| FromCBOR DeltaCoin | |
| FromCBOR AccountState | |
| FromCBOR LogWeight | |
| FromCBOR MIRPot | |
| FromCBOR PerformanceEstimate | |
| FromCBOR RewardType | |
| FromCBOR VotingPeriod | |
| FromCBOR TxValidationError | |
| FromCBOR Certificate Source # | |
Defined in Cardano.Api.Certificate | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| FromCBOR OperationalCertificate Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR a ⇒ FromCBOR [a] | |
| FromCBOR a ⇒ FromCBOR (Maybe a) | |
| (Integral a, FromCBOR a) ⇒ FromCBOR (Ratio a) | |
| (Ord a, FromCBOR a) ⇒ FromCBOR (Set a) | |
| FromCBOR a ⇒ FromCBOR (NonEmpty a) | |
| (Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) | |
| FromCBOR a ⇒ FromCBOR (Vector a) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BootstrapWitness crypto)) | |
| (Era era, FromCBOR (Annotator (PParamsDelta era))) ⇒ FromCBOR (Annotator (PPUPState era)) | |
| Era era ⇒ FromCBOR (Annotator (PParams era)) | |
| Era era ⇒ FromCBOR (Annotator (PParamsUpdate era)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBody era)) | |
| (Era era, TransUTxO FromCBOR era, FromCBOR (Annotator (PParams era)), FromCBOR (Annotator (State (EraRule "PPUP" era)))) ⇒ FromCBOR (Annotator (NewEpochState era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BHeader crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryData era)) | |
| (BlockAnn era, ToCBOR (TxBody era), ToCBOR (AuxiliaryData era), ValidateScript era) ⇒ FromCBOR (Annotator (Block era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (Timelock crypto)) | |
| (Era era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), TransUTxO FromCBOR era, FromCBOR (Annotator (State (EraRule "PPUP" era)))) ⇒ FromCBOR (Annotator (LedgerState era)) | |
| (FromCBOR (Annotator (TxBody era)), ValidateScript era, FromCBOR (Annotator (Script era)), FromCBOR (Annotator (AuxiliaryData era))) ⇒ FromCBOR (Annotator (Tx era)) | |
| (FromCBOR (Annotator (PParams era)), TransValue FromCBOR era, TransUTxO FromCBOR era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), FromCBOR (Annotator (State (EraRule "PPUP" era))), Era era) ⇒ FromCBOR (Annotator (EpochState era)) | |
| (Era era, FromCBOR (TxOut era), FromCBOR (Annotator (PParamsDelta era))) ⇒ FromCBOR (Annotator (TxBody era)) | |
| Typeable era ⇒ FromCBOR (Annotator (Metadata era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSig crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryDataRaw era)) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (Header (ShelleyBlock era))) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (ShelleyBlock era)) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, FromCBOR (Annotator (State (EraRule "PPUP" era))), HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era)) ⇒ FromCBOR (Annotator (UTxOState era)) | |
| (Era era, FromCBOR (Annotator (PParamsDelta era))) ⇒ FromCBOR (Annotator (ProposedPPUpdates era)) | |
| (Era era, FromCBOR (Annotator (PParamsDelta era))) ⇒ FromCBOR (Annotator (Update era)) | |
| (Typeable t, FromCBOR (Annotator t)) ⇒ FromCBOR (Annotator (MemoBytes t)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (TimelockRaw crypto)) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Annotator (WitVKey kr crypto)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| (Era era, BlockAnn era, ToCBOR (TxBody era), ToCBOR (AuxiliaryData era), ValidateScript era) ⇒ FromCBOR (Annotator (LaxBlock era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSigRaw crypto)) | |
| (FromCBOR (TxOut era), Era era, FromCBOR (Annotator (PParamsDelta era))) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| FromCBOR (SigDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SigDSIGN Ed25519Bip32DSIGN) # | |
| FromCBOR (SigDSIGN Ed25519DSIGN) | |
| FromCBOR (SigDSIGN MockDSIGN) | |
| FromCBOR (SigDSIGN Ed448DSIGN) | |
| FromCBOR (SignKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock Methods fromCBOR ∷ Decoder s (SignKeyDSIGN MockDSIGN) # label ∷ Proxy (SignKeyDSIGN MockDSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed448DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed448DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock | |
| FromCBOR (VerKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed448DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed448DSIGN) → Text # | |
| Crypto crypto ⇒ FromCBOR (ScriptHash crypto) | |
| FromCBOR a ⇒ FromCBOR (StrictMaybe a) | |
| Crypto crypto ⇒ FromCBOR (Addr crypto) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (PPUPState era) | |
| Era era ⇒ FromCBOR (PParams era) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
| (Era era, TransUTxO FromCBOR era, FromCBOR (PParams era), FromCBOR (State (EraRule "PPUP" era))) ⇒ FromCBOR (NewEpochState era) | |
| (Era era, TransTxOut DecodeNonNegative era, Show (Value era)) ⇒ FromCBOR (TxOut era) | |
| (ShelleyBased era, FromCBOR (PredicateFailure (EraRule "LEDGERS" era))) ⇒ FromCBOR (ApplyTxError era) | |
| (Era era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), TransUTxO FromCBOR era, FromCBOR (State (EraRule "PPUP" era))) ⇒ FromCBOR (LedgerState era) | |
| (ShelleyBased era, FromCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (LedgersPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (NonMyopic crypto) | |
| Crypto crypto ⇒ FromCBOR (PState crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolParams crypto) | |
| Crypto crypto ⇒ FromCBOR (InstantaneousRewards crypto) | |
| Crypto crypto ⇒ FromCBOR (SnapShots crypto) | |
| Crypto crypto ⇒ FromCBOR (SnapShot crypto) | |
| Era era ⇒ FromCBOR (ShelleyGenesis era) | |
Defined in Shelley.Spec.Ledger.Genesis | |
| Crypto crypto ⇒ FromCBOR (ChainDepState crypto) | |
| Crypto crypto ⇒ FromCBOR (GenDelegPair crypto) | |
| Crypto crypto ⇒ FromCBOR (BlocksMade crypto) | |
| (FromCBOR (PParams era), TransValue FromCBOR era, TransUTxO FromCBOR era, HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era), FromCBOR (State (EraRule "PPUP" era)), Era era) ⇒ FromCBOR (EpochState era) | |
| Crypto crypto ⇒ FromCBOR (PulsingRewUpdate crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolDistr crypto) | |
| (FromCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) | |
| Crypto crypto ⇒ FromCBOR (FutureGenDeleg crypto) | |
| Crypto crypto ⇒ FromCBOR (DState crypto) | |
| Crypto crypto ⇒ FromCBOR (IndividualPoolStake crypto) | |
| Crypto crypto ⇒ FromCBOR (Value crypto) | |
| Crypto crypto ⇒ FromCBOR (PolicyID crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenance crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenancePool crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardAcnt crypto) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SigKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SigKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SigKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SigKES (SimpleKES d t)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (VerKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (VerKeyKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (VerKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (VerKeyKES (SimpleKES d t)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SignKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SignKeyKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SignKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SignKeyKES (SimpleKES d t)) | |
| Crypto crypto ⇒ FromCBOR (BHBody crypto) | |
| Crypto crypto ⇒ FromCBOR (CompactAddr crypto) | |
| FromCBOR (CompactForm Coin) | |
| Crypto crypto ⇒ FromCBOR (CompactForm (Value crypto)) | |
| Crypto c ⇒ FromCBOR (ShelleyHash c) | |
| Era era ⇒ FromCBOR (CompactGenesis era) | |
| FromCBOR (SignKeyVRF PraosVRF) | |
| FromCBOR (SignKeyVRF MockVRF) | |
| FromCBOR (SignKeyVRF SimpleVRF) | |
| FromCBOR (VerKeyVRF PraosVRF) | |
| FromCBOR (VerKeyVRF MockVRF) | |
| FromCBOR (VerKeyVRF SimpleVRF) | |
| Crypto crypto ⇒ FromCBOR (PrtclState crypto) | |
| Typeable v ⇒ FromCBOR (OutputVRF v) | |
| Crypto crypto ⇒ FromCBOR (ShelleyGenesisStaking crypto) | |
| FromCBOR (ATxAux ByteSpan) | |
| FromCBOR (ACertificate ByteSpan) | |
| FromCBOR (AProposal ByteSpan) | |
| FromCBOR (AVote ByteSpan) | |
| Crypto crypto ⇒ FromCBOR (PrevHash crypto) | |
| Crypto crypto ⇒ FromCBOR (HashHeader crypto) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, FromCBOR (State (EraRule "PPUP" era)), HashAnnotated (TxBody era) EraIndependentTxBody (Crypto era)) ⇒ FromCBOR (UTxOState era) | |
| Crypto crypto ⇒ FromCBOR (DPState crypto) | |
| (Era era, FromCBOR (PParamsDelta era)) ⇒ FromCBOR (ProposedPPUpdates era) | |
| Crypto crypto ⇒ FromCBOR (TxIn crypto) | |
| Crypto crypto ⇒ FromCBOR (TxId crypto) | |
| FromCBOR (CertVRF PraosVRF) | |
| FromCBOR (CertVRF MockVRF) | |
| FromCBOR (CertVRF SimpleVRF) | |
| Typeable a ⇒ FromCBOR (RedeemSignature a) | |
| Typeable a ⇒ FromCBOR (Signature a) | |
| FromCBOR (ABody ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (ABlockSignature ByteSpan) | |
| FromCBOR (ATxPayload ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (Attributes ()) | |
| FromCBOR (Attributes AddrAttributes) | |
| FromCBOR a ⇒ FromCBOR (MerkleRoot a) | |
| (FromCBOR a, ToCBOR a) ⇒ FromCBOR (MerkleTree a) | |
| FromCBOR n ⇒ FromCBOR (TooLarge n) | |
| Crypto crypto ⇒ FromCBOR (CompactValue crypto) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| Era era ⇒ FromCBOR (PpupPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (DCert crypto) | |
| Crypto crypto ⇒ FromCBOR (Wdrl crypto) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (UtxowPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (AuxiliaryDataHash crypto) | |
| Crypto crypto ⇒ FromCBOR (GenDelegs crypto) | |
| Crypto crypto ⇒ FromCBOR (HashBBody crypto) | |
| Crypto crypto ⇒ FromCBOR (LastAppliedBlock crypto) | |
| (FromCBORGroup a, ToCBORGroup a) ⇒ FromCBOR (CBORGroup a) | |
| Crypto crypto ⇒ FromCBOR (MIRCert crypto) | |
| Crypto crypto ⇒ FromCBOR (StakeCreds crypto) | |
| Crypto crypto ⇒ FromCBOR (Stake crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardSnapShot crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardUpdate crypto) | |
| Crypto crypto ⇒ FromCBOR (Reward crypto) | |
| Crypto c ⇒ FromCBOR (Pulser c) | |
| Crypto crypto ⇒ FromCBOR (OBftSlot crypto) | |
| Crypto crypto ⇒ FromCBOR (FreeVars crypto) | |
| (Era era, Typeable (Script era)) ⇒ FromCBOR (DelegPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "DELPL" era)), Typeable (Script era)) ⇒ FromCBOR (DelegsPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "POOL" era)), FromCBOR (PredicateFailure (EraRule "DELEG" era)), Typeable (Script era)) ⇒ FromCBOR (DelplPredicateFailure era) | |
| Era era ⇒ FromCBOR (PoolPredicateFailure era) | |
| (FromCBOR (PredicateFailure (EraRule "DELEGS" era)), FromCBOR (PredicateFailure (EraRule "UTXOW" era)), Era era) ⇒ FromCBOR (LedgerPredicateFailure era) | |
| (TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (MIRTarget crypto) | |
| FromCBOR (VerificationKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakePoolKey) # label ∷ Proxy (VerificationKey StakePoolKey) → Text # | |
| FromCBOR (VerificationKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisUTxOKey) # label ∷ Proxy (VerificationKey GenesisUTxOKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateExtendedKey) # label ∷ Proxy (VerificationKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateKey) # | |
| FromCBOR (VerificationKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisExtendedKey) # | |
| FromCBOR (VerificationKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisKey) # label ∷ Proxy (VerificationKey GenesisKey) → Text # | |
| FromCBOR (VerificationKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeExtendedKey) # | |
| FromCBOR (VerificationKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeKey) # | |
| FromCBOR (VerificationKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentExtendedKey) # | |
| FromCBOR (VerificationKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentKey) # label ∷ Proxy (VerificationKey PaymentKey) → Text # | |
| FromCBOR (VerificationKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKeyLegacy) # label ∷ Proxy (VerificationKey ByronKeyLegacy) → Text # | |
| FromCBOR (VerificationKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKey) # | |
| FromCBOR (VerificationKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey VrfKey) # | |
| FromCBOR (VerificationKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey KesKey) # | |
| FromCBOR (SigningKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakePoolKey) # label ∷ Proxy (SigningKey StakePoolKey) → Text # | |
| FromCBOR (SigningKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisUTxOKey) # label ∷ Proxy (SigningKey GenesisUTxOKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateExtendedKey) # label ∷ Proxy (SigningKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateKey) # label ∷ Proxy (SigningKey GenesisDelegateKey) → Text # | |
| FromCBOR (SigningKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisExtendedKey) # label ∷ Proxy (SigningKey GenesisExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakeExtendedKey) # label ∷ Proxy (SigningKey StakeExtendedKey) → Text # | |
| FromCBOR (SigningKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey PaymentExtendedKey) # label ∷ Proxy (SigningKey PaymentExtendedKey) → Text # | |
| FromCBOR (SigningKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (SigningKey ByronKeyLegacy) # label ∷ Proxy (SigningKey ByronKeyLegacy) → Text # | |
| FromCBOR (SigningKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron | |
| FromCBOR (SigningKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| FromCBOR (SigningKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| FromCBOR a ⇒ FromCBOR (CborSeq a) | |
| (Typeable era, TransLedgerState FromCBOR (ShelleyLedgerEra era)) ⇒ FromCBOR (LedgerState era) Source # | |
Defined in Cardano.Api.Query | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (Either a b) | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (a, b) | |
| (Ord k, FromCBOR k, FromCBOR v) ⇒ FromCBOR (Map k v) | |
| (HashAlgorithm h, Typeable a) ⇒ FromCBOR (Hash h a) | |
| (Crypto crypto, Typeable disc) ⇒ FromCBOR (KeyHash disc crypto) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Credential kr crypto) | |
| (Typeable index, Crypto c) ⇒ FromCBOR (SafeHash c index) | |
| (Crypto crypto, Typeable kd) ⇒ FromCBOR (VKey kd crypto) | |
| (VRFAlgorithm v, Typeable a) ⇒ FromCBOR (CertifiedVRF v a) | |
| (Typeable algo, Typeable a, HashAlgorithm algo) ⇒ FromCBOR (AbstractHash algo a) | |
| (FromCBOR a, FromCBOR b, FromCBOR c) ⇒ FromCBOR (a, b, c) | |
| (Typeable s, FromCBOR a) ⇒ FromCBOR (Tagged s a) | |
| (Ord a, Ord b, FromCBOR a, FromCBOR b) ⇒ FromCBOR (BiMap b a b) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) ⇒ FromCBOR (a, b, c, d) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) ⇒ FromCBOR (a, b, c, d, e) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) ⇒ FromCBOR (a, b, c, d, e, f, g) | |
serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString Source #
deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a Source #
JSON
Instances
| ToJSON Bool | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Bool → Encoding # toJSONList ∷ [Bool] → Value # toEncodingList ∷ [Bool] → Encoding # | |
| ToJSON Char | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Char → Encoding # toJSONList ∷ [Char] → Value # toEncodingList ∷ [Char] → Encoding # | |
| ToJSON Double | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Double → Encoding # toJSONList ∷ [Double] → Value # toEncodingList ∷ [Double] → Encoding # | |
| ToJSON Float | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Float → Encoding # toJSONList ∷ [Float] → Value # toEncodingList ∷ [Float] → Encoding # | |
| ToJSON Int | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Int8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int8 → Encoding # toJSONList ∷ [Int8] → Value # toEncodingList ∷ [Int8] → Encoding # | |
| ToJSON Int16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int16 → Encoding # toJSONList ∷ [Int16] → Value # toEncodingList ∷ [Int16] → Encoding # | |
| ToJSON Int32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int32 → Encoding # toJSONList ∷ [Int32] → Value # toEncodingList ∷ [Int32] → Encoding # | |
| ToJSON Int64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int64 → Encoding # toJSONList ∷ [Int64] → Value # toEncodingList ∷ [Int64] → Encoding # | |
| ToJSON Integer | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Integer → Encoding # toJSONList ∷ [Integer] → Value # toEncodingList ∷ [Integer] → Encoding # | |
| ToJSON Natural | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Natural → Encoding # toJSONList ∷ [Natural] → Value # toEncodingList ∷ [Natural] → Encoding # | |
| ToJSON Ordering | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ordering → Encoding # toJSONList ∷ [Ordering] → Value # toEncodingList ∷ [Ordering] → Encoding # | |
| ToJSON Word | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word → Encoding # toJSONList ∷ [Word] → Value # toEncodingList ∷ [Word] → Encoding # | |
| ToJSON Word8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word8 → Encoding # toJSONList ∷ [Word8] → Value # toEncodingList ∷ [Word8] → Encoding # | |
| ToJSON Word16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word16 → Encoding # toJSONList ∷ [Word16] → Value # toEncodingList ∷ [Word16] → Encoding # | |
| ToJSON Word32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word32 → Encoding # toJSONList ∷ [Word32] → Value # toEncodingList ∷ [Word32] → Encoding # | |
| ToJSON Word64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word64 → Encoding # toJSONList ∷ [Word64] → Value # toEncodingList ∷ [Word64] → Encoding # | |
| ToJSON () | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Version | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Version → Encoding # toJSONList ∷ [Version] → Value # toEncodingList ∷ [Version] → Encoding # | |
| ToJSON Void | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Void → Encoding # toJSONList ∷ [Void] → Value # toEncodingList ∷ [Void] → Encoding # | |
| ToJSON CTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ CTime → Encoding # toJSONList ∷ [CTime] → Value # toEncodingList ∷ [CTime] → Encoding # | |
| ToJSON IntSet | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntSet → Encoding # toJSONList ∷ [IntSet] → Value # toEncodingList ∷ [IntSet] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON ZonedTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ ZonedTime → Encoding # toJSONList ∷ [ZonedTime] → Value # toEncodingList ∷ [ZonedTime] → Encoding # | |
| ToJSON LocalTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ LocalTime → Encoding # toJSONList ∷ [LocalTime] → Value # toEncodingList ∷ [LocalTime] → Encoding # | |
| ToJSON TimeOfDay | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ TimeOfDay → Encoding # toJSONList ∷ [TimeOfDay] → Value # toEncodingList ∷ [TimeOfDay] → Encoding # | |
| ToJSON CalendarDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffTime → Value # toEncoding ∷ CalendarDiffTime → Encoding # toJSONList ∷ [CalendarDiffTime] → Value # toEncodingList ∷ [CalendarDiffTime] → Encoding # | |
| ToJSON UTCTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UTCTime → Encoding # toJSONList ∷ [UTCTime] → Value # toEncodingList ∷ [UTCTime] → Encoding # | |
| ToJSON SystemTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SystemTime → Value # toEncoding ∷ SystemTime → Encoding # toJSONList ∷ [SystemTime] → Value # toEncodingList ∷ [SystemTime] → Encoding # | |
| ToJSON NominalDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ NominalDiffTime → Value # toEncoding ∷ NominalDiffTime → Encoding # toJSONList ∷ [NominalDiffTime] → Value # toEncodingList ∷ [NominalDiffTime] → Encoding # | |
| ToJSON DiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DiffTime → Encoding # toJSONList ∷ [DiffTime] → Value # toEncodingList ∷ [DiffTime] → Encoding # | |
| ToJSON DayOfWeek | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DayOfWeek → Encoding # toJSONList ∷ [DayOfWeek] → Value # toEncodingList ∷ [DayOfWeek] → Encoding # | |
| ToJSON Day | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON CalendarDiffDays | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffDays → Value # toEncoding ∷ CalendarDiffDays → Encoding # toJSONList ∷ [CalendarDiffDays] → Value # toEncodingList ∷ [CalendarDiffDays] → Encoding # | |
| ToJSON Number | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Number → Encoding # toJSONList ∷ [Number] → Value # toEncodingList ∷ [Number] → Encoding # | |
| ToJSON Scientific | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Scientific → Encoding # toJSONList ∷ [Scientific] → Value # toEncodingList ∷ [Scientific] → Encoding # | |
| ToJSON DotNetTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DotNetTime → Encoding # toJSONList ∷ [DotNetTime] → Value # toEncodingList ∷ [DotNetTime] → Encoding # | |
| ToJSON Value | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON ByteSpan | |
Defined in Cardano.Binary.Annotated Methods toEncoding ∷ ByteSpan → Encoding # toJSONList ∷ [ByteSpan] → Value # toEncodingList ∷ [ByteSpan] → Encoding # | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| ToJSON EpochSize | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochSize → Encoding # toJSONList ∷ [EpochSize] → Value # toEncodingList ∷ [EpochSize] → Encoding # | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| ToJSON UUID | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UUID → Encoding # toJSONList ∷ [UUID] → Value # toEncodingList ∷ [UUID] → Encoding # | |
| ToJSON Coin | |
Defined in Shelley.Spec.Ledger.Coin Methods toEncoding ∷ Coin → Encoding # toJSONList ∷ [Coin] → Value # toEncodingList ∷ [Coin] → Encoding # | |
| ToJSON UnitInterval | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toJSON ∷ UnitInterval → Value # toEncoding ∷ UnitInterval → Encoding # toJSONList ∷ [UnitInterval] → Value # toEncodingList ∷ [UnitInterval] → Encoding # | |
| ToJSON ProtVer | |
Defined in Shelley.Spec.Ledger.PParams Methods toEncoding ∷ ProtVer → Encoding # toJSONList ∷ [ProtVer] → Value # toEncodingList ∷ [ProtVer] → Encoding # | |
| ToJSON Likelihood Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Likelihood → Encoding # toJSONList ∷ [Likelihood] → Value # toEncodingList ∷ [Likelihood] → Encoding # | |
| ToJSON Ptr Source # | |
Defined in Cardano.Api.Orphans | |
| ToJSON Nonce | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ Nonce → Encoding # toJSONList ∷ [Nonce] → Value # toEncodingList ∷ [Nonce] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON Desirability | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ Desirability → Value # toEncoding ∷ Desirability → Encoding # toJSONList ∷ [Desirability] → Value # toEncodingList ∷ [Desirability] → Encoding # | |
| ToJSON StakePoolRelay | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ StakePoolRelay → Value # toEncoding ∷ StakePoolRelay → Encoding # toJSONList ∷ [StakePoolRelay] → Value # toEncodingList ∷ [StakePoolRelay] → Encoding # | |
| ToJSON PoolMetadata | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ PoolMetadata → Value # toEncoding ∷ PoolMetadata → Encoding # toJSONList ∷ [PoolMetadata] → Value # toEncodingList ∷ [PoolMetadata] → Encoding # | |
| ToJSON Network | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ Network → Encoding # toJSONList ∷ [Network] → Value # toEncodingList ∷ [Network] → Encoding # | |
| ToJSON AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ AnyCardanoEra → Value # toEncoding ∷ AnyCardanoEra → Encoding # toJSONList ∷ [AnyCardanoEra] → Value # toEncodingList ∷ [AnyCardanoEra] → Encoding # | |
| ToJSON Month | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Month → Encoding # toJSONList ∷ [Month] → Value # toEncodingList ∷ [Month] → Encoding # | |
| ToJSON Quarter | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Quarter → Encoding # toJSONList ∷ [Quarter] → Value # toEncodingList ∷ [Quarter] → Encoding # | |
| ToJSON QuarterOfYear | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ QuarterOfYear → Value # toEncoding ∷ QuarterOfYear → Encoding # toJSONList ∷ [QuarterOfYear] → Value # toEncodingList ∷ [QuarterOfYear] → Encoding # | |
| ToJSON EpochNumber | |
Defined in Cardano.Chain.Slotting.EpochNumber Methods toJSON ∷ EpochNumber → Value # toEncoding ∷ EpochNumber → Encoding # toJSONList ∷ [EpochNumber] → Value # toEncodingList ∷ [EpochNumber] → Encoding # | |
| ToJSON SlotNumber | |
Defined in Cardano.Chain.Slotting.SlotNumber Methods toEncoding ∷ SlotNumber → Encoding # toJSONList ∷ [SlotNumber] → Value # toEncodingList ∷ [SlotNumber] → Encoding # | |
| ToJSON RequiresNetworkMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ RequiresNetworkMagic → Value # toEncoding ∷ RequiresNetworkMagic → Encoding # toJSONList ∷ [RequiresNetworkMagic] → Value # toEncodingList ∷ [RequiresNetworkMagic] → Encoding # | |
| ToJSON ProtocolVersion | |
Defined in Cardano.Chain.Update.ProtocolVersion Methods toJSON ∷ ProtocolVersion → Value # toEncoding ∷ ProtocolVersion → Encoding # toJSONList ∷ [ProtocolVersion] → Value # toEncodingList ∷ [ProtocolVersion] → Encoding # | |
| ToJSON ProtocolMagicId | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagicId → Value # toEncoding ∷ ProtocolMagicId → Encoding # toJSONList ∷ [ProtocolMagicId] → Value # toEncodingList ∷ [ProtocolMagicId] → Encoding # | |
| ToJSON SoftwareVersion | |
Defined in Cardano.Chain.Update.SoftwareVersion Methods toJSON ∷ SoftwareVersion → Value # toEncoding ∷ SoftwareVersion → Encoding # toJSONList ∷ [SoftwareVersion] → Value # toEncodingList ∷ [SoftwareVersion] → Encoding # | |
| ToJSON VerificationKey | |
Defined in Cardano.Crypto.Signing.VerificationKey Methods toJSON ∷ VerificationKey → Value # toEncoding ∷ VerificationKey → Encoding # toJSONList ∷ [VerificationKey] → Value # toEncodingList ∷ [VerificationKey] → Encoding # | |
| ToJSON GenesisHash | |
Defined in Cardano.Chain.Genesis.Hash Methods toJSON ∷ GenesisHash → Value # toEncoding ∷ GenesisHash → Encoding # toJSONList ∷ [GenesisHash] → Value # toEncodingList ∷ [GenesisHash] → Encoding # | |
| ToJSON Tx | |
Defined in Cardano.Chain.UTxO.Tx | |
| ToJSON ProtocolMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagic → Value # toEncoding ∷ ProtocolMagic → Encoding # toJSONList ∷ [ProtocolMagic] → Value # toEncodingList ∷ [ProtocolMagic] → Encoding # | |
| ToJSON CompactRedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.Compact Methods toJSON ∷ CompactRedeemVerificationKey → Value # toEncoding ∷ CompactRedeemVerificationKey → Encoding # toJSONList ∷ [CompactRedeemVerificationKey] → Value # toEncodingList ∷ [CompactRedeemVerificationKey] → Encoding # | |
| ToJSON Lovelace | |
Defined in Cardano.Chain.Common.Lovelace Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON ByteString64 | |
Defined in Data.ByteString.Base64.Type Methods toJSON ∷ ByteString64 → Value # toEncoding ∷ ByteString64 → Encoding # toJSONList ∷ [ByteString64] → Value # toEncodingList ∷ [ByteString64] → Encoding # | |
| ToJSON RedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.VerificationKey Methods toJSON ∷ RedeemVerificationKey → Value # toEncoding ∷ RedeemVerificationKey → Encoding # toJSONList ∷ [RedeemVerificationKey] → Value # toEncodingList ∷ [RedeemVerificationKey] → Encoding # | |
| ToJSON ChainDifficulty | |
Defined in Cardano.Chain.Common.ChainDifficulty Methods toJSON ∷ ChainDifficulty → Value # toEncoding ∷ ChainDifficulty → Encoding # toJSONList ∷ [ChainDifficulty] → Value # toEncodingList ∷ [ChainDifficulty] → Encoding # | |
| ToJSON Proof | |
Defined in Cardano.Chain.Block.Proof Methods toEncoding ∷ Proof → Encoding # toJSONList ∷ [Proof] → Value # toEncodingList ∷ [Proof] → Encoding # | |
| ToJSON SscPayload | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscPayload → Encoding # toJSONList ∷ [SscPayload] → Value # toEncodingList ∷ [SscPayload] → Encoding # | |
| ToJSON ProposalBody | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ ProposalBody → Value # toEncoding ∷ ProposalBody → Encoding # toJSONList ∷ [ProposalBody] → Value # toEncodingList ∷ [ProposalBody] → Encoding # | |
| ToJSON TxInWitness | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toJSON ∷ TxInWitness → Value # toEncoding ∷ TxInWitness → Encoding # toJSONList ∷ [TxInWitness] → Value # toEncodingList ∷ [TxInWitness] → Encoding # | |
| ToJSON TxProof | |
Defined in Cardano.Chain.UTxO.TxProof Methods toEncoding ∷ TxProof → Encoding # toJSONList ∷ [TxProof] → Value # toEncodingList ∷ [TxProof] → Encoding # | |
| ToJSON SscProof | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscProof → Encoding # toJSONList ∷ [SscProof] → Value # toEncodingList ∷ [SscProof] → Encoding # | |
| ToJSON ApplicationName | |
Defined in Cardano.Chain.Update.ApplicationName Methods toJSON ∷ ApplicationName → Value # toEncoding ∷ ApplicationName → Encoding # toJSONList ∷ [ApplicationName] → Value # toEncodingList ∷ [ApplicationName] → Encoding # | |
| ToJSON AddrAttributes | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ AddrAttributes → Value # toEncoding ∷ AddrAttributes → Encoding # toJSONList ∷ [AddrAttributes] → Value # toEncodingList ∷ [AddrAttributes] → Encoding # | |
| ToJSON HDAddressPayload | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ HDAddressPayload → Value # toEncoding ∷ HDAddressPayload → Encoding # toJSONList ∷ [HDAddressPayload] → Value # toEncodingList ∷ [HDAddressPayload] → Encoding # | |
| ToJSON NetworkMagic | |
Defined in Cardano.Chain.Common.NetworkMagic Methods toJSON ∷ NetworkMagic → Value # toEncoding ∷ NetworkMagic → Encoding # toJSONList ∷ [NetworkMagic] → Value # toEncodingList ∷ [NetworkMagic] → Encoding # | |
| ToJSON UnparsedFields | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ UnparsedFields → Value # toEncoding ∷ UnparsedFields → Encoding # toJSONList ∷ [UnparsedFields] → Value # toEncodingList ∷ [UnparsedFields] → Encoding # | |
| ToJSON AddrType | |
Defined in Cardano.Chain.Common.AddrSpendingData Methods toEncoding ∷ AddrType → Encoding # toJSONList ∷ [AddrType] → Value # toEncodingList ∷ [AddrType] → Encoding # | |
| ToJSON Address | |
Defined in Cardano.Chain.Common.Address Methods toEncoding ∷ Address → Encoding # toJSONList ∷ [Address] → Value # toEncodingList ∷ [Address] → Encoding # | |
| ToJSON LovelacePortion | |
Defined in Cardano.Chain.Common.LovelacePortion Methods toJSON ∷ LovelacePortion → Value # toEncoding ∷ LovelacePortion → Encoding # toJSONList ∷ [LovelacePortion] → Value # toEncodingList ∷ [LovelacePortion] → Encoding # | |
| ToJSON TxFeePolicy | |
Defined in Cardano.Chain.Common.TxFeePolicy Methods toJSON ∷ TxFeePolicy → Value # toEncoding ∷ TxFeePolicy → Encoding # toJSONList ∷ [TxFeePolicy] → Value # toEncodingList ∷ [TxFeePolicy] → Encoding # | |
| ToJSON TxSizeLinear | |
Defined in Cardano.Chain.Common.TxSizeLinear Methods toJSON ∷ TxSizeLinear → Value # toEncoding ∷ TxSizeLinear → Encoding # toJSONList ∷ [TxSizeLinear] → Value # toEncodingList ∷ [TxSizeLinear] → Encoding # | |
| ToJSON TxIn | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxOut | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxOut → Encoding # toJSONList ∷ [TxOut] → Value # toEncodingList ∷ [TxOut] → Encoding # | |
| ToJSON TxSigData | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toEncoding ∷ TxSigData → Encoding # toJSONList ∷ [TxSigData] → Value # toEncodingList ∷ [TxSigData] → Encoding # | |
| ToJSON InstallerHash | |
Defined in Cardano.Chain.Update.InstallerHash Methods toJSON ∷ InstallerHash → Value # toEncoding ∷ InstallerHash → Encoding # toJSONList ∷ [InstallerHash] → Value # toEncodingList ∷ [InstallerHash] → Encoding # | |
| ToJSON SystemTag | |
Defined in Cardano.Chain.Update.SystemTag Methods toEncoding ∷ SystemTag → Encoding # toJSONList ∷ [SystemTag] → Value # toEncodingList ∷ [SystemTag] → Encoding # | |
| ToJSON ProtocolParametersUpdate | |
Defined in Cardano.Chain.Update.ProtocolParametersUpdate Methods toJSON ∷ ProtocolParametersUpdate → Value # toEncoding ∷ ProtocolParametersUpdate → Encoding # toJSONList ∷ [ProtocolParametersUpdate] → Value # toEncodingList ∷ [ProtocolParametersUpdate] → Encoding # | |
| ToJSON SoftforkRule | |
Defined in Cardano.Chain.Update.SoftforkRule Methods toJSON ∷ SoftforkRule → Value # toEncoding ∷ SoftforkRule → Encoding # toJSONList ∷ [SoftforkRule] → Value # toEncodingList ∷ [SoftforkRule] → Encoding # | |
| ToJSON DnsName | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ DnsName → Encoding # toJSONList ∷ [DnsName] → Value # toEncodingList ∷ [DnsName] → Encoding # | |
| ToJSON Port | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ Port → Encoding # toJSONList ∷ [Port] → Value # toEncodingList ∷ [Port] → Encoding # | |
| ToJSON Url | |
Defined in Shelley.Spec.Ledger.BaseTypes | |
| ToJSON DeltaCoin Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ DeltaCoin → Encoding # toJSONList ∷ [DeltaCoin] → Value # toEncodingList ∷ [DeltaCoin] → Encoding # | |
| ToJSON AccountState Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ AccountState → Value # toEncoding ∷ AccountState → Encoding # toJSONList ∷ [AccountState] → Value # toEncodingList ∷ [AccountState] → Encoding # | |
| ToJSON RewardType Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ RewardType → Encoding # toJSONList ∷ [RewardType] → Value # toEncodingList ∷ [RewardType] → Encoding # | |
| ToJSON StudentT | |
Defined in Statistics.Distribution.StudentT Methods toEncoding ∷ StudentT → Encoding # toJSONList ∷ [StudentT] → Value # toEncodingList ∷ [StudentT] → Encoding # | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
| ToJSON TextEnvelopeDescr Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeDescr → Value # toEncoding ∷ TextEnvelopeDescr → Encoding # toJSONList ∷ [TextEnvelopeDescr] → Value # toEncodingList ∷ [TextEnvelopeDescr] → Encoding # | |
| ToJSON TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeType → Value # toEncoding ∷ TextEnvelopeType → Encoding # toJSONList ∷ [TextEnvelopeType] → Value # toEncodingList ∷ [TextEnvelopeType] → Encoding # | |
| ToJSON TxSubmitStatus Source # | |
Defined in Cardano.Api.TxSubmit.Types Methods toJSON ∷ TxSubmitStatus → Value # toEncoding ∷ TxSubmitStatus → Encoding # toJSONList ∷ [TxSubmitStatus] → Value # toEncodingList ∷ [TxSubmitStatus] → Encoding # | |
| ToJSON ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptInAnyLang → Value # toEncoding ∷ ScriptInAnyLang → Encoding # toJSONList ∷ [ScriptInAnyLang] → Value # toEncodingList ∷ [ScriptInAnyLang] → Encoding # | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
| ToJSON Value Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value0 # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ PraosNonce → Value # toEncoding ∷ PraosNonce → Encoding # toJSONList ∷ [PraosNonce] → Value # toEncodingList ∷ [PraosNonce] → Encoding # | |
| ToJSON ProtocolParameters Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ ProtocolParameters → Value # toEncoding ∷ ProtocolParameters → Encoding # toJSONList ∷ [ProtocolParameters] → Value # toEncodingList ∷ [ProtocolParameters] → Encoding # | |
| ToJSON TxIx Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIx → Encoding # toJSONList ∷ [TxIx] → Value # toEncodingList ∷ [TxIx] → Encoding # | |
| ToJSON TxIn Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxId Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
| ToJSON ChainTip Source # | |
Defined in Cardano.Api.Block Methods toEncoding ∷ ChainTip → Encoding # toJSONList ∷ [ChainTip] → Value # toEncodingList ∷ [ChainTip] → Encoding # | |
| ToJSON a ⇒ ToJSON [a] | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| (ToJSON a, Integral a) ⇒ ToJSON (Ratio a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ratio a → Encoding # toJSONList ∷ [Ratio a] → Value # toEncodingList ∷ [Ratio a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Set a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Set a → Encoding # toJSONList ∷ [Set a] → Value # toEncodingList ∷ [Set a] → Encoding # | |
| ToJSON a ⇒ ToJSON (NonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ NonEmpty a → Encoding # toJSONList ∷ [NonEmpty a] → Value # toEncodingList ∷ [NonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Identity a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Identity a → Encoding # toJSONList ∷ [Identity a] → Value # toEncodingList ∷ [Identity a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Min a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Min a → Encoding # toJSONList ∷ [Min a] → Value # toEncodingList ∷ [Min a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Max a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Max a → Encoding # toJSONList ∷ [Max a] → Value # toEncodingList ∷ [Max a] → Encoding # | |
| ToJSON a ⇒ ToJSON (WrappedMonoid a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ WrappedMonoid a → Value # toEncoding ∷ WrappedMonoid a → Encoding # toJSONList ∷ [WrappedMonoid a] → Value # toEncodingList ∷ [WrappedMonoid a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Option a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Option a → Encoding # toJSONList ∷ [Option a] → Value # toEncodingList ∷ [Option a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Dual a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Dual a → Encoding # toJSONList ∷ [Dual a] → Value # toEncodingList ∷ [Dual a] → Encoding # | |
| ToJSON a ⇒ ToJSON (IntMap a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntMap a → Encoding # toJSONList ∷ [IntMap a] → Value # toEncodingList ∷ [IntMap a] → Encoding # | |
| ToJSON v ⇒ ToJSON (Tree v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tree v → Encoding # toJSONList ∷ [Tree v] → Value # toEncodingList ∷ [Tree v] → Encoding # | |
| ToJSON a ⇒ ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Seq a → Encoding # toJSONList ∷ [Seq a] → Value # toEncodingList ∷ [Seq a] → Encoding # | |
| (Vector Vector a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON1 f ⇒ ToJSON (Fix f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fix f → Encoding # toJSONList ∷ [Fix f] → Value # toEncodingList ∷ [Fix f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Mu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Mu f → Encoding # toJSONList ∷ [Mu f] → Value # toEncodingList ∷ [Mu f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Nu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Nu f → Encoding # toJSONList ∷ [Nu f] → Value # toEncodingList ∷ [Nu f] → Encoding # | |
| ToJSON a ⇒ ToJSON (DNonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ DNonEmpty a → Value # toEncoding ∷ DNonEmpty a → Encoding # toJSONList ∷ [DNonEmpty a] → Value # toEncodingList ∷ [DNonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (DList a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DList a → Encoding # toJSONList ∷ [DList a] → Value # toEncodingList ∷ [DList a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Array a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Array a → Encoding # toJSONList ∷ [Array a] → Value # toEncodingList ∷ [Array a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (PrimArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ PrimArray a → Value # toEncoding ∷ PrimArray a → Encoding # toJSONList ∷ [PrimArray a] → Value # toEncodingList ∷ [PrimArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (SmallArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SmallArray a → Value # toEncoding ∷ SmallArray a → Encoding # toJSONList ∷ [SmallArray a] → Value # toEncodingList ∷ [SmallArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| ToJSON a ⇒ ToJSON (HashSet a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ HashSet a → Encoding # toJSONList ∷ [HashSet a] → Value # toEncodingList ∷ [HashSet a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| (Storable a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON (ScriptHash crypto) | |
Defined in Shelley.Spec.Ledger.Scripts Methods toJSON ∷ ScriptHash crypto → Value # toEncoding ∷ ScriptHash crypto → Encoding # toJSONList ∷ [ScriptHash crypto] → Value # toEncodingList ∷ [ScriptHash crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (StrictMaybe a) | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toJSON ∷ StrictMaybe a → Value # toEncoding ∷ StrictMaybe a → Encoding # toJSONList ∷ [StrictMaybe a] → Value # toEncodingList ∷ [StrictMaybe a] → Encoding # | |
| ToJSON (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address Methods toJSON ∷ Addr crypto → Value # toEncoding ∷ Addr crypto → Encoding # toJSONList ∷ [Addr crypto] → Value # toEncodingList ∷ [Addr crypto] → Encoding # | |
| (ToJSON (PParamsDelta era), UsesPParams era) ⇒ ToJSON (PPUPState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PPUPState era → Value # toEncoding ∷ PPUPState era → Encoding # toJSONList ∷ [PPUPState era] → Value # toEncodingList ∷ [PPUPState era] → Encoding # | |
| ToJSON (PParams era) | |
Defined in Shelley.Spec.Ledger.PParams Methods toJSON ∷ PParams era → Value # toEncoding ∷ PParams era → Encoding # toJSONList ∷ [PParams era] → Value # toEncodingList ∷ [PParams era] → Encoding # | |
| ToJSON (PParamsUpdate era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PParamsUpdate era → Value # toEncoding ∷ PParamsUpdate era → Encoding # toJSONList ∷ [PParamsUpdate era] → Value # toEncodingList ∷ [PParamsUpdate era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (Value era)) ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParamsDelta era)) ⇒ ToJSON (LedgerState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ LedgerState era → Value # toEncoding ∷ LedgerState era → Encoding # toJSONList ∷ [LedgerState era] → Value # toEncodingList ∷ [LedgerState era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (NonMyopic crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ NonMyopic crypto → Value # toEncoding ∷ NonMyopic crypto → Encoding # toJSONList ∷ [NonMyopic crypto] → Value # toEncodingList ∷ [NonMyopic crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PState crypto → Value # toEncoding ∷ PState crypto → Encoding # toJSONList ∷ [PState crypto] → Value # toEncodingList ∷ [PState crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolParams crypto) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ PoolParams crypto → Value # toEncoding ∷ PoolParams crypto → Encoding # toJSONList ∷ [PoolParams crypto] → Value # toEncodingList ∷ [PoolParams crypto] → Encoding # | |
| ToJSON (InstantaneousRewards crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ InstantaneousRewards crypto → Value # toEncoding ∷ InstantaneousRewards crypto → Encoding # toJSONList ∷ [InstantaneousRewards crypto] → Value # toEncodingList ∷ [InstantaneousRewards crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (SnapShots crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SnapShots crypto → Value # toEncoding ∷ SnapShots crypto → Encoding # toJSONList ∷ [SnapShots crypto] → Value # toEncodingList ∷ [SnapShots crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (SnapShot crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SnapShot crypto → Value # toEncoding ∷ SnapShot crypto → Encoding # toJSONList ∷ [SnapShot crypto] → Value # toEncodingList ∷ [SnapShot crypto] → Encoding # | |
| Era era ⇒ ToJSON (ShelleyGenesis era) | |
Defined in Shelley.Spec.Ledger.Genesis Methods toJSON ∷ ShelleyGenesis era → Value # toEncoding ∷ ShelleyGenesis era → Encoding # toJSONList ∷ [ShelleyGenesis era] → Value # toEncodingList ∷ [ShelleyGenesis era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegPair crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSON ∷ GenDelegPair crypto → Value # toEncoding ∷ GenDelegPair crypto → Encoding # toJSONList ∷ [GenDelegPair crypto] → Value # toEncodingList ∷ [GenDelegPair crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (BlocksMade crypto) | |
Defined in Shelley.Spec.Ledger.EpochBoundary Methods toJSON ∷ BlocksMade crypto → Value # toEncoding ∷ BlocksMade crypto → Encoding # toJSONList ∷ [BlocksMade crypto] → Value # toEncodingList ∷ [BlocksMade crypto] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParams era), ToJSON (PParamsDelta era)) ⇒ ToJSON (EpochState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ EpochState era → Value # toEncoding ∷ EpochState era → Encoding # toJSONList ∷ [EpochState era] → Value # toEncodingList ∷ [EpochState era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PulsingRewUpdate crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PulsingRewUpdate crypto → Value # toEncoding ∷ PulsingRewUpdate crypto → Encoding # toJSONList ∷ [PulsingRewUpdate crypto] → Value # toEncodingList ∷ [PulsingRewUpdate crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolDistr crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PoolDistr crypto → Value # toEncoding ∷ PoolDistr crypto → Encoding # toJSONList ∷ [PoolDistr crypto] → Value # toEncodingList ∷ [PoolDistr crypto] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era)) ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
| ToJSON (FutureGenDeleg crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ FutureGenDeleg crypto → Value # toEncoding ∷ FutureGenDeleg crypto → Encoding # toJSONList ∷ [FutureGenDeleg crypto] → Value # toEncodingList ∷ [FutureGenDeleg crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (DState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ DState crypto → Value # toEncoding ∷ DState crypto → Encoding # toJSONList ∷ [DState crypto] → Value # toEncodingList ∷ [DState crypto] → Encoding # | |
| ToJSON (IndividualPoolStake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ IndividualPoolStake crypto → Value # toEncoding ∷ IndividualPoolStake crypto → Encoding # toJSONList ∷ [IndividualPoolStake crypto] → Value # toEncodingList ∷ [IndividualPoolStake crypto] → Encoding # | |
| ToJSON (Value era) Source # | |
Defined in Cardano.Api.Orphans Methods toEncoding ∷ Value era → Encoding # toJSONList ∷ [Value era] → Value0 # toEncodingList ∷ [Value era] → Encoding # | |
| ToJSON (PolicyID era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ PolicyID era → Value # toEncoding ∷ PolicyID era → Encoding # toJSONList ∷ [PolicyID era] → Value # toEncodingList ∷ [PolicyID era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenance crypto) | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ RewardProvenance crypto → Value # toEncoding ∷ RewardProvenance crypto → Encoding # toJSONList ∷ [RewardProvenance crypto] → Value # toEncodingList ∷ [RewardProvenance crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenancePool crypto) | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ RewardProvenancePool crypto → Value # toEncoding ∷ RewardProvenancePool crypto → Encoding # toJSONList ∷ [RewardProvenancePool crypto] → Value # toEncodingList ∷ [RewardProvenancePool crypto] → Encoding # | |
| ToJSON (RewardAcnt crypto) | |
Defined in Shelley.Spec.Ledger.Address Methods toJSON ∷ RewardAcnt crypto → Value # toEncoding ∷ RewardAcnt crypto → Encoding # toJSONList ∷ [RewardAcnt crypto] → Value # toEncodingList ∷ [RewardAcnt crypto] → Encoding # | |
| ToJSON (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras Methods toJSON ∷ CardanoEra era → Value # toEncoding ∷ CardanoEra era → Encoding # toJSONList ∷ [CardanoEra era] → Value # toEncodingList ∷ [CardanoEra era] → Encoding # | |
| ToJSON (Hash StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods toJSON ∷ Hash StakePoolKey → Value # toEncoding ∷ Hash StakePoolKey → Encoding # toJSONList ∷ [Hash StakePoolKey] → Value # toEncodingList ∷ [Hash StakePoolKey] → Encoding # | |
| ToJSON a ⇒ ToJSON (AHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toEncoding ∷ AHeader a → Encoding # toJSONList ∷ [AHeader a] → Value # toEncodingList ∷ [AHeader a] → Encoding # | |
| Crypto crypto ⇒ ToJSON (ShelleyGenesisStaking crypto) | |
Defined in Shelley.Spec.Ledger.Genesis Methods toJSON ∷ ShelleyGenesisStaking crypto → Value # toEncoding ∷ ShelleyGenesisStaking crypto → Encoding # toJSONList ∷ [ShelleyGenesisStaking crypto] → Value # toEncodingList ∷ [ShelleyGenesisStaking crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxAux a) | |
Defined in Cardano.Chain.UTxO.TxAux Methods toEncoding ∷ ATxAux a → Encoding # toJSONList ∷ [ATxAux a] → Value # toEncodingList ∷ [ATxAux a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ACertificate a) | |
Defined in Cardano.Chain.Delegation.Certificate Methods toJSON ∷ ACertificate a → Value # toEncoding ∷ ACertificate a → Encoding # toJSONList ∷ [ACertificate a] → Value # toEncodingList ∷ [ACertificate a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AProposal a) | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ AProposal a → Value # toEncoding ∷ AProposal a → Encoding # toJSONList ∷ [AProposal a] → Value # toEncodingList ∷ [AProposal a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AVote a) | |
Defined in Cardano.Chain.Update.Vote Methods toEncoding ∷ AVote a → Encoding # toJSONList ∷ [AVote a] → Value # toEncodingList ∷ [AVote a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockOrBoundary a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABlockOrBoundary a → Value # toEncoding ∷ ABlockOrBoundary a → Encoding # toJSONList ∷ [ABlockOrBoundary a] → Value # toEncodingList ∷ [ABlockOrBoundary a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABoundaryHeader a → Value # toEncoding ∷ ABoundaryHeader a → Encoding # toJSONList ∷ [ABoundaryHeader a] → Value # toEncodingList ∷ [ABoundaryHeader a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBlock a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBlock a → Value # toEncoding ∷ ABoundaryBlock a → Encoding # toJSONList ∷ [ABoundaryBlock a] → Value # toEncodingList ∷ [ABoundaryBlock a] → Encoding # | |
| (ShelleyBasedEra era, ToJSON (TxOut era), ToJSON (PParamsDelta era)) ⇒ ToJSON (UTxOState era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ UTxOState era → Value # toEncoding ∷ UTxOState era → Encoding # toJSONList ∷ [UTxOState era] → Value # toEncodingList ∷ [UTxOState era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (DPState crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ DPState crypto → Value # toEncoding ∷ DPState crypto → Encoding # toJSONList ∷ [DPState crypto] → Value # toEncodingList ∷ [DPState crypto] → Encoding # | |
| (ToJSON (PParamsDelta era), UsesPParams era) ⇒ ToJSON (ProposedPPUpdates era) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ ProposedPPUpdates era → Value # toEncoding ∷ ProposedPPUpdates era → Encoding # toJSONList ∷ [ProposedPPUpdates era] → Value # toEncodingList ∷ [ProposedPPUpdates era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (TxIn crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ TxIn crypto → Value # toEncoding ∷ TxIn crypto → Encoding # toJSONList ∷ [TxIn crypto] → Value # toEncodingList ∷ [TxIn crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlock a) | |
Defined in Cardano.Chain.Block.Block Methods toEncoding ∷ ABlock a → Encoding # toJSONList ∷ [ABlock a] → Value # toEncodingList ∷ [ABlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (RedeemSignature a) | |
Defined in Cardano.Crypto.Signing.Redeem.Signature Methods toJSON ∷ RedeemSignature a → Value # toEncoding ∷ RedeemSignature a → Encoding # toJSONList ∷ [RedeemSignature a] → Value # toEncodingList ∷ [RedeemSignature a] → Encoding # | |
| ToJSON (Signature w) | |
Defined in Cardano.Crypto.Signing.Signature Methods toJSON ∷ Signature w → Value # toEncoding ∷ Signature w → Encoding # toJSONList ∷ [Signature w] → Value # toEncodingList ∷ [Signature w] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBody a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBody a → Value # toEncoding ∷ ABoundaryBody a → Encoding # toJSONList ∷ [ABoundaryBody a] → Value # toEncodingList ∷ [ABoundaryBody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABody a) | |
Defined in Cardano.Chain.Block.Body Methods toEncoding ∷ ABody a → Encoding # toJSONList ∷ [ABody a] → Value # toEncodingList ∷ [ABody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Delegation.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockSignature a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABlockSignature a → Value # toEncoding ∷ ABlockSignature a → Encoding # toJSONList ∷ [ABlockSignature a] → Value # toEncodingList ∷ [ABlockSignature a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxPayload a) | |
Defined in Cardano.Chain.UTxO.TxPayload Methods toJSON ∷ ATxPayload a → Value # toEncoding ∷ ATxPayload a → Encoding # toJSONList ∷ [ATxPayload a] → Value # toEncodingList ∷ [ATxPayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Update.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Attributes a) | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ Attributes a → Value # toEncoding ∷ Attributes a → Encoding # toJSONList ∷ [Attributes a] → Value # toEncodingList ∷ [Attributes a] → Encoding # | |
| ToJSON a ⇒ ToJSON (MerkleRoot a) | |
Defined in Cardano.Chain.Common.Merkle Methods toJSON ∷ MerkleRoot a → Value # toEncoding ∷ MerkleRoot a → Encoding # toJSONList ∷ [MerkleRoot a] → Value # toEncodingList ∷ [MerkleRoot a] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegs crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ GenDelegs crypto → Value # toEncoding ∷ GenDelegs crypto → Encoding # toJSONList ∷ [GenDelegs crypto] → Value # toEncodingList ∷ [GenDelegs crypto] → Encoding # | |
| ToJSON (StakeCreds crypto) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ StakeCreds crypto → Value # toEncoding ∷ StakeCreds crypto → Encoding # toJSONList ∷ [StakeCreds crypto] → Value # toEncodingList ∷ [StakeCreds crypto] → Encoding # | |
| ToJSON (Stake crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Stake crypto → Value # toEncoding ∷ Stake crypto → Encoding # toJSONList ∷ [Stake crypto] → Value # toEncodingList ∷ [Stake crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardUpdate crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ RewardUpdate crypto → Value # toEncoding ∷ RewardUpdate crypto → Encoding # toJSONList ∷ [RewardUpdate crypto] → Value # toEncodingList ∷ [RewardUpdate crypto] → Encoding # | |
| ToJSON (Reward crypto) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Reward crypto → Value # toEncoding ∷ Reward crypto → Encoding # toJSONList ∷ [Reward crypto] → Value # toEncodingList ∷ [Reward crypto] → Encoding # | |
| ToJSON d ⇒ ToJSON (LinearTransform d) | |
Defined in Statistics.Distribution.Transform Methods toJSON ∷ LinearTransform d → Value # toEncoding ∷ LinearTransform d → Encoding # toJSONList ∷ [LinearTransform d] → Value # toEncodingList ∷ [LinearTransform d] → Encoding # | |
| ToJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ SimpleScript lang → Value # toEncoding ∷ SimpleScript lang → Encoding # toJSONList ∷ [SimpleScript lang] → Value # toEncodingList ∷ [SimpleScript lang] → Encoding # | |
| ToJSON (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptInEra era → Value # toEncoding ∷ ScriptInEra era → Encoding # toJSONList ∷ [ScriptInEra era] → Value # toEncodingList ∷ [ScriptInEra era] → Encoding # | |
| ToJSON (Script lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ Script lang → Value # toEncoding ∷ Script lang → Encoding # toJSONList ∷ [Script lang] → Value # toEncodingList ∷ [Script lang] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods toJSON ∷ AddressInEra era → Value # toEncoding ∷ AddressInEra era → Encoding # toJSONList ∷ [AddressInEra era] → Value # toEncodingList ∷ [AddressInEra era] → Encoding # | |
| ToJSON (TxOutValue era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ TxOutValue era → Value # toEncoding ∷ TxOutValue era → Encoding # toJSONList ∷ [TxOutValue era] → Value # toEncodingList ∷ [TxOutValue era] → Encoding # | |
| ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (TxOut era) Source # | |
Defined in Cardano.Api.TxBody Methods toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
| (IsShelleyBasedEra era, ShelleyLedgerEra era ~ ledgerera, ShelleyBasedEra ledgerera, ToJSON (PParams ledgerera), ToJSON (PParamsDelta ledgerera), ToJSON (TxOut ledgerera)) ⇒ ToJSON (LedgerState era) Source # | |
Defined in Cardano.Api.Query Methods toJSON ∷ LedgerState era → Value # toEncoding ∷ LedgerState era → Encoding # toJSONList ∷ [LedgerState era] → Value # toEncodingList ∷ [LedgerState era] → Encoding # | |
| IsCardanoEra era ⇒ ToJSON (UTxO era) Source # | |
Defined in Cardano.Api.Query Methods toEncoding ∷ UTxO era → Encoding # toJSONList ∷ [UTxO era] → Value # toEncodingList ∷ [UTxO era] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (a, b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b) → Encoding # toJSONList ∷ [(a, b)] → Value # toEncodingList ∷ [(a, b)] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (Map k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Map k v → Encoding # toJSONList ∷ [Map k v] → Value # toEncodingList ∷ [Map k v] → Encoding # | |
| ToJSON (Proxy a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Proxy a → Encoding # toJSONList ∷ [Proxy a] → Value # toEncodingList ∷ [Proxy a] → Encoding # | |
| HasResolution a ⇒ ToJSON (Fixed a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fixed a → Encoding # toJSONList ∷ [Fixed a] → Value # toEncodingList ∷ [Fixed a] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (HashMap k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ HashMap k v → Value # toEncoding ∷ HashMap k v → Encoding # toJSONList ∷ [HashMap k v] → Value # toEncodingList ∷ [HashMap k v] → Encoding # | |
| ToJSON b ⇒ ToJSON (Annotated b a) | |
Defined in Cardano.Binary.Annotated Methods toJSON ∷ Annotated b a → Value # toEncoding ∷ Annotated b a → Encoding # toJSONList ∷ [Annotated b a] → Value # toEncodingList ∷ [Annotated b a] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Pair a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Pair a b → Encoding # toJSONList ∷ [Pair a b] → Value # toEncodingList ∷ [Pair a b] → Encoding # | |
| ToJSON (Hash crypto a) | |
Defined in Cardano.Crypto.Hash.Class Methods toJSON ∷ Hash crypto a → Value # toEncoding ∷ Hash crypto a → Encoding # toJSONList ∷ [Hash crypto a] → Value # toEncodingList ∷ [Hash crypto a] → Encoding # | |
| ToJSON (KeyHash disc crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSON ∷ KeyHash disc crypto → Value # toEncoding ∷ KeyHash disc crypto → Encoding # toJSONList ∷ [KeyHash disc crypto] → Value # toEncodingList ∷ [KeyHash disc crypto] → Encoding # | |
| ToJSON (Credential kr crypto) | |
Defined in Shelley.Spec.Ledger.Credential Methods toJSON ∷ Credential kr crypto → Value # toEncoding ∷ Credential kr crypto → Encoding # toJSONList ∷ [Credential kr crypto] → Value # toEncodingList ∷ [Credential kr crypto] → Encoding # | |
| ToJSON (SafeHash c a) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ SafeHash c a → Value # toEncoding ∷ SafeHash c a → Encoding # toJSONList ∷ [SafeHash c a] → Value # toEncodingList ∷ [SafeHash c a] → Encoding # | |
| ToJSON (AbstractHash algo a) | |
Defined in Cardano.Crypto.Hashing Methods toJSON ∷ AbstractHash algo a → Value # toEncoding ∷ AbstractHash algo a → Encoding # toJSONList ∷ [AbstractHash algo a] → Value # toEncodingList ∷ [AbstractHash algo a] → Encoding # | |
| ToJSON (Bimap Ptr (Credential 'Staking crypto)) Source # | |
Defined in Cardano.Api.Orphans Methods toJSON ∷ Bimap Ptr (Credential 'Staking crypto) → Value # toEncoding ∷ Bimap Ptr (Credential 'Staking crypto) → Encoding # toJSONList ∷ [Bimap Ptr (Credential 'Staking crypto)] → Value # toEncodingList ∷ [Bimap Ptr (Credential 'Staking crypto)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c) ⇒ ToJSON (a, b, c) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b, c) → Encoding # toJSONList ∷ [(a, b, c)] → Value # toEncodingList ∷ [(a, b, c)] → Encoding # | |
| ToJSON a ⇒ ToJSON (Const a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Const a b → Encoding # toJSONList ∷ [Const a b] → Value # toEncodingList ∷ [Const a b] → Encoding # | |
| ToJSON b ⇒ ToJSON (Tagged a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tagged a b → Encoding # toJSONList ∷ [Tagged a b] → Value # toEncodingList ∷ [Tagged a b] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (These1 f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ These1 f g a → Value # toEncoding ∷ These1 f g a → Encoding # toJSONList ∷ [These1 f g a] → Value # toEncodingList ∷ [These1 f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d) ⇒ ToJSON (a, b, c, d) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d) → Value # toEncoding ∷ (a, b, c, d) → Encoding # toJSONList ∷ [(a, b, c, d)] → Value # toEncodingList ∷ [(a, b, c, d)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Product f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Product f g a → Value # toEncoding ∷ Product f g a → Encoding # toJSONList ∷ [Product f g a] → Value # toEncodingList ∷ [Product f g a] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Sum f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Sum f g a → Encoding # toJSONList ∷ [Sum f g a] → Value # toEncodingList ∷ [Sum f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) ⇒ ToJSON (a, b, c, d, e) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e) → Value # toEncoding ∷ (a, b, c, d, e) → Encoding # toJSONList ∷ [(a, b, c, d, e)] → Value # toEncodingList ∷ [(a, b, c, d, e)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Compose f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Compose f g a → Value # toEncoding ∷ Compose f g a → Encoding # toJSONList ∷ [Compose f g a] → Value # toEncodingList ∷ [Compose f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) ⇒ ToJSON (a, b, c, d, e, f) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f) → Value # toEncoding ∷ (a, b, c, d, e, f) → Encoding # toJSONList ∷ [(a, b, c, d, e, f)] → Value # toEncodingList ∷ [(a, b, c, d, e, f)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) ⇒ ToJSON (a, b, c, d, e, f, g) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g) → Value # toEncoding ∷ (a, b, c, d, e, f, g) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) ⇒ ToJSON (a, b, c, d, e, f, g, h) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) ⇒ ToJSON (a, b, c, d, e, f, g, h, i) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Encoding # | |
Instances
serialiseToJSON ∷ ToJSON a ⇒ a → ByteString Source #
deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a Source #
newtype JsonDecodeError Source #
Constructors
| JsonDecodeError String |
Instances
| Eq JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods (==) ∷ JsonDecodeError → JsonDecodeError → Bool # (/=) ∷ JsonDecodeError → JsonDecodeError → Bool # | |
| Show JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods showsPrec ∷ Int → JsonDecodeError → ShowS # show ∷ JsonDecodeError → String # showList ∷ [JsonDecodeError] → ShowS # | |
| Error JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods | |
readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a) Source #
Bech32
class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a Source #
Minimal complete definition
Instances
serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text Source #
deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a Source #
deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b Source #
data Bech32DecodeError Source #
Bech32 decoding error.
Constructors
| Bech32DecodingError !DecodingError | There was an error decoding the string as Bech32. |
| Bech32UnexpectedPrefix !Text !(Set Text) | The human-readable prefix in the Bech32-encoded string is not one of the ones expected. |
| Bech32DataPartToBytesError !Text | There was an error in extracting a |
| Bech32DeserialiseFromBytesError !ByteString | There was an error in deserialising the bytes into a value of the expected type. |
| Bech32WrongPrefix !Text !Text | The human-readable prefix in the Bech32-encoded string does not correspond to the prefix that should be used for the payload value. |
Instances
| Eq Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
| Show Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods showsPrec ∷ Int → Bech32DecodeError → ShowS # show ∷ Bech32DecodeError → String # showList ∷ [Bech32DecodeError] → ShowS # | |
| Error Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
Addresses
Address serialisation is (sadly) special
class HasTypeProxy addr ⇒ SerialiseAddress addr Source #
Address serialisation uses different serialisation formats for different kinds of addresses, so it needs its own class.
In particular, Byron addresses are typically formatted in base 58, while Shelley addresses (payment and stake) are formatted using Bech32.
Minimal complete definition
Instances
| SerialiseAddress StakeAddress Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ StakeAddress → Text Source # deserialiseAddress ∷ AsType StakeAddress → Text → Maybe StakeAddress Source # | |
| SerialiseAddress AddressAny Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressAny → Text Source # deserialiseAddress ∷ AsType AddressAny → Text → Maybe AddressAny Source # | |
| IsCardanoEra era ⇒ SerialiseAddress (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressInEra era → Text Source # deserialiseAddress ∷ AsType (AddressInEra era) → Text → Maybe (AddressInEra era) Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text Source #
deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr Source #
Raw binary
Some types have a natural raw binary format.
class HasTypeProxy a ⇒ SerialiseAsRawBytes a Source #
Minimal complete definition
Instances
serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString Source #
deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
serialiseToRawBytesHexText ∷ SerialiseAsRawBytes a ⇒ a → Text Source #
Text envelope
Support for a envelope file format with text headers and a hex-encoded binary payload.
class SerialiseAsCBOR a ⇒ HasTextEnvelope a where Source #
Minimal complete definition
Methods
Instances
data TextEnvelope Source #
A TextEnvelope is a structured envelope for serialised binary values
with an external format with a semi-readable textual format.
It contains a "type" field, e.g. "PublicKeyByron" or "TxSignedShelley" to indicate the type of the encoded data. This is used as a sanity check and to help readers.
It also contains a "title" field which is free-form, and could be used to indicate the role or purpose to a reader.
Constructors
| TextEnvelope | |
Fields | |
Instances
| Eq TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| Show TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods showsPrec ∷ Int → TextEnvelope → ShowS # show ∷ TextEnvelope → String # showList ∷ [TextEnvelope] → ShowS # | |
| FromJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
newtype TextEnvelopeType Source #
Constructors
| TextEnvelopeType String |
Instances
data TextEnvelopeDescr Source #
Instances
data TextEnvelopeError Source #
The errors that the pure TextEnvelope parsing/decoding functions can return.
Constructors
| TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType | expected, actual |
| TextEnvelopeDecodeError !DecoderError | |
| TextEnvelopeAesonDecodeError !String |
Instances
| Eq TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
| Show TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods showsPrec ∷ Int → TextEnvelopeError → ShowS # show ∷ TextEnvelopeError → String # showList ∷ [TextEnvelopeError] → ShowS # | |
| Error TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope Source #
deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a Source #
readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a) Source #
writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
Reading one of several key types
data FromSomeType (c ∷ Type → Constraint) b where Source #
Constructors
| FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b |
deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b Source #
readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b) Source #
Errors
class Show e ⇒ Error e where Source #
Methods
displayError ∷ e → String Source #
Instances
throwErrorAsException ∷ Error e ⇒ e → IO a Source #
The preferred approach is to use Except or ExceptT, but you can if
necessary use IO exceptions.
Constructors
| FileError FilePath e | |
| FileErrorTempFile | |
| FileIOError FilePath IOException | |
Instances
Node interaction
Operations that involve talking to a local Cardano node.
Queries
Submitting transactions
Low level protocol interaction with a Cardano node
connectToLocalNode ∷ LocalNodeConnectInfo mode → LocalNodeClientProtocolsInMode mode → IO () Source #
Establish a connection to a local node and execute the given set of protocol handlers.
data LocalNodeConnectInfo mode Source #
Constructors
| LocalNodeConnectInfo | |
data AnyConsensusMode where Source #
Constructors
| AnyConsensusMode ∷ ConsensusMode mode → AnyConsensusMode |
Instances
| Show AnyConsensusMode Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → AnyConsensusMode → ShowS # show ∷ AnyConsensusMode → String # showList ∷ [AnyConsensusMode] → ShowS # | |
data ConsensusMode mode where Source #
This GADT provides a value-level representation of all the consensus modes. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
Constructors
| CardanoMode ∷ ConsensusMode CardanoMode |
Instances
| Show (ConsensusMode mode) Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → ConsensusMode mode → ShowS # show ∷ ConsensusMode mode → String # showList ∷ [ConsensusMode mode] → ShowS # | |
consensusModeOnly ∷ ConsensusModeParams mode → ConsensusMode mode Source #
data ConsensusModeIsMultiEra mode where Source #
The subset of consensus modes that consist of multiple eras. Some features are not supported in single-era modes (for exact compatibility with not using the hard fork combinatior at all).
Constructors
| CardanoModeIsMultiEra ∷ ConsensusModeIsMultiEra CardanoMode |
Instances
| Show (ConsensusModeIsMultiEra mode) Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → ConsensusModeIsMultiEra mode → ShowS # show ∷ ConsensusModeIsMultiEra mode → String # showList ∷ [ConsensusModeIsMultiEra mode] → ShowS # | |
data AnyConsensusModeParams where Source #
Constructors
| AnyConsensusModeParams ∷ ConsensusModeParams mode → AnyConsensusModeParams |
Instances
| Show AnyConsensusModeParams Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → AnyConsensusModeParams → ShowS # show ∷ AnyConsensusModeParams → String # showList ∷ [AnyConsensusModeParams] → ShowS # | |
data ConsensusModeParams mode where Source #
The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.
It is in fact only the Byron era that requires extra parameters, but this is
of course inherited by the CardanoMode that uses the Byron era. The reason
this parameter is needed stems from unfortunate design decisions from the
legacy Byron era. The slots per epoch are needed to be able to decode
epoch boundary blocks from the Byron era.
It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.
Constructors
| ByronModeParams ∷ EpochSlots → ConsensusModeParams ByronMode | |
| ShelleyModeParams ∷ ConsensusModeParams ShelleyMode | |
| CardanoModeParams ∷ EpochSlots → ConsensusModeParams CardanoMode |
Instances
| Show (ConsensusModeParams mode) Source # | |
Defined in Cardano.Api.Modes Methods showsPrec ∷ Int → ConsensusModeParams mode → ShowS # show ∷ ConsensusModeParams mode → String # showList ∷ [ConsensusModeParams mode] → ShowS # | |
data EraInMode era mode where Source #
A representation of which CardanoEras are included in each
ConsensusMode.
Constructors
toEraInMode ∷ CardanoEra era → ConsensusMode mode → Maybe (EraInMode era mode) Source #
data LocalNodeClientProtocols block point tip tx txerr query m Source #
The protocols we can use with a local node. Use in conjunction with
connectToLocalNode.
These protocols use the types from the rest of this API. The conversion
to/from the types used by the underlying wire formats is handled by
connectToLocalNode.
Constructors
| LocalNodeClientProtocols | |
Fields
| |
data LocalChainSyncClient block point tip m Source #
Constructors
| NoLocalChainSyncClient | |
| LocalChainSyncClientPipelined (ChainSyncClientPipelined block point tip m ()) | |
| LocalChainSyncClient (ChainSyncClient block point tip m ()) |
data CardanoMode Source #
The Cardano consensus mode consists of all the eras currently in use on
the Cardano mainnet. This is currently: the ByronEra; ShelleyEra,
AllegraEra and MaryEra, in that order.
This mode will be extended with new eras as the Cardano mainnet develops.
Chain sync protocol
To construct a ChainSyncClient see Cardano.Api.Client or
Cardano.Api.ClientPipelined.
newtype ChainSyncClient header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClient | |
Fields
| |
newtype ChainSyncClientPipelined header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClientPipelined | |
Fields
| |
data BlockInMode mode where Source #
A Block in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode this type is a sum of the
different block types for all the eras. It is used in the ChainSync protocol.
Constructors
| BlockInMode ∷ Block era → EraInMode era mode → BlockInMode mode |
Instances
| Show (BlockInMode mode) Source # | |
Defined in Cardano.Api.Block Methods showsPrec ∷ Int → BlockInMode mode → ShowS # show ∷ BlockInMode mode → String # showList ∷ [BlockInMode mode] → ShowS # | |
type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols (BlockInMode mode) ChainPoint ChainTip (TxInMode mode) (TxValidationErrorInMode mode) (QueryInMode mode) IO Source #
Local tx submission
data LocalTxSubmissionClient tx reject (m ∷ Type → Type) a #
data TxInMode mode where Source #
A Tx in one of the eras supported by a given protocol mode.
For multi-era modes such as the CardanoMode this type is a sum of the
different transaction types for all the eras. It is used in the
LocalTxSubmission protocol.
Constructors
| TxInMode ∷ Tx era → EraInMode era mode → TxInMode mode | Everything we consider a normal transaction. |
| TxInByronSpecial ∷ GenTx ByronBlock → EraInMode ByronEra mode → TxInMode mode | Byron has various things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs. |
data TxValidationErrorInMode mode where Source #
A TxValidationError in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
Constructors
| TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode | |
| TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode |
Instances
| Show (TxValidationErrorInMode mode) Source # | |
Defined in Cardano.Api.TxInMode Methods showsPrec ∷ Int → TxValidationErrorInMode mode → ShowS # show ∷ TxValidationErrorInMode mode → String # showList ∷ [TxValidationErrorInMode mode] → ShowS # | |
runLocalTxSubmissionClient ∷ LocalTxSubmissionClient tx reject m a → m (LocalTxClientStIdle tx reject m a) #
submitTxToNodeLocal ∷ ∀ mode. LocalNodeConnectInfo mode → TxInMode mode → IO (SubmitResult (TxValidationErrorInMode mode)) Source #
Local state query
newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a #
Constructors
| LocalStateQueryClient | |
Fields
| |
data QueryInMode mode result where Source #
Constructors
| QueryCurrentEra ∷ ConsensusModeIsMultiEra mode → QueryInMode mode AnyCardanoEra | |
| QueryInEra ∷ EraInMode era mode → QueryInEra era result → QueryInMode mode (Either EraMismatch result) |
Instances
| Show (QueryInMode mode result) Source # | |
Defined in Cardano.Api.Query Methods showsPrec ∷ Int → QueryInMode mode result → ShowS # show ∷ QueryInMode mode result → String # showList ∷ [QueryInMode mode result] → ShowS # | |
data QueryInEra era result where Source #
Constructors
| QueryByronUpdateState ∷ QueryInEra ByronEra ByronUpdateState | |
| QueryInShelleyBasedEra ∷ ShelleyBasedEra era → QueryInShelleyBasedEra era result → QueryInEra era result |
Instances
| Show (QueryInEra era result) Source # | |
Defined in Cardano.Api.Query Methods showsPrec ∷ Int → QueryInEra era result → ShowS # show ∷ QueryInEra era result → String # showList ∷ [QueryInEra era result] → ShowS # | |
queryNodeLocalState ∷ ∀ mode result. LocalNodeConnectInfo mode → Maybe ChainPoint → QueryInMode mode result → IO (Either AcquireFailure result) Source #
Establish a connection to a node and execute a single query using the local state query protocol.
Common queries
getLocalChainTip ∷ LocalNodeConnectInfo mode → IO ChainTip Source #
Node operation
Support for the steps needed to operate a node
Operational certificates
data OperationalCertificate Source #
Instances
data OperationalCertificateIssueCounter Source #
Instances
| Eq OperationalCertificateIssueCounter Source # | |
| Show OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| ToCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods toCBOR ∷ OperationalCertificateIssueCounter → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy OperationalCertificateIssueCounter → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [OperationalCertificateIssueCounter] → Size # | |
| HasTypeProxy OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Associated Types | |
| SerialiseAsCBOR OperationalCertificateIssueCounter Source # | |
| HasTextEnvelope OperationalCertificateIssueCounter Source # | |
| data AsType OperationalCertificateIssueCounter Source # | |
data OperationalCertIssueError Source #
Instances
| Show OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods showsPrec ∷ Int → OperationalCertIssueError → ShowS # | |
| Error OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods | |
issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter) Source #
Genesis file
Types and functions needed to inspect or create a genesis file.
data GenesisKey Source #
Instances
data GenesisExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisDelegateKey Source #
Instances
data GenesisDelegateExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisUTxOKey Source #
Instances
genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn Source #
Compute the TxIn of the initial UTxO pseudo-transaction corresponding
to the given address in the genesis initial funds.
The Shelley initial UTxO is constructed from the sgInitialFunds which
is not a full UTxO but just a map from addresses to coin values.
This gets turned into a UTxO by making a pseudo-transaction for each address,
with the 0th output being the coin value. So to spend from the initial UTxO
we need this same TxIn to use as an input to the spending transaction.
Special transactions
There are various additional things that can be embedded in a transaction for special operations.
makeMIRCertificate ∷ MIRPot → MIRTarget → Certificate Source #
makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate Source #
The MIRTarget determines the target of a MIRCertificate.
A MIRCertificate moves lovelace from either the reserves or the treasury
to either a collection of stake credentials or to the other pot.
Constructors
| StakeAddressesMIR [(StakeCredential, Lovelace)] | Use |
| SendToReservesMIR Lovelace | Use |
| SendToTreasuryMIR Lovelace | Use |
Protocol parameter updates
data UpdateProposal Source #
Constructors
| UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo |
Instances
| Eq UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters Methods (==) ∷ UpdateProposal → UpdateProposal → Bool # (/=) ∷ UpdateProposal → UpdateProposal → Bool # | |
| Show UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters Methods showsPrec ∷ Int → UpdateProposal → ShowS # show ∷ UpdateProposal → String # showList ∷ [UpdateProposal] → ShowS # | |
| HasTypeProxy UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters Associated Types data AsType UpdateProposal Source # Methods proxyToAsType ∷ Proxy UpdateProposal → AsType UpdateProposal Source # | |
| SerialiseAsCBOR UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters Methods serialiseToCBOR ∷ UpdateProposal → ByteString Source # deserialiseFromCBOR ∷ AsType UpdateProposal → ByteString → Either DecoderError UpdateProposal Source # | |
| HasTextEnvelope UpdateProposal Source # | |
| data AsType UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data ProtocolParametersUpdate Source #
The representation of a change in the ProtocolParameters.
Constructors
| ProtocolParametersUpdate | |
Fields
| |
Instances
makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal Source #
data PraosNonce Source #
Instances
newtype NetworkMagic #
Constructors
| NetworkMagic | |
Fields | |
Instances
| Eq NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
| Show NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods showsPrec ∷ Int → NetworkMagic → ShowS # show ∷ NetworkMagic → String # showList ∷ [NetworkMagic] → ShowS # | |
| Generic NetworkMagic | |
Defined in Ouroboros.Network.Magic Associated Types type Rep NetworkMagic ∷ Type → Type # | |
| NoThunks NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods noThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) wNoThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) | |
| type Rep NetworkMagic | |
Defined in Ouroboros.Network.Magic type Rep NetworkMagic = D1 ('MetaData "NetworkMagic" "Ouroboros.Network.Magic" "ouroboros-network-0.1.0.0-5a75f2377a14618f623a0a0742363424588bd8c1241748fdf2284ee864d27b18" 'True) (C1 ('MetaCons "NetworkMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNetworkMagic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |
Conversions
data SomeNodeClientProtocol where Source #
Constructors
| SomeNodeClientProtocol ∷ RunNode blk ⇒ ProtocolClient blk (BlockProtocol blk) → SomeNodeClientProtocol |